几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-07, 04:25 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】strange Behavior Of The Detach Function On Oddbdim

strange behavior of the detach function on oddbdimstyletable
strange behavior of the detach function on oddbdimstyletablerecordptr
i am using dd2.1.1 for net2003 in my application. now there is a strange problem: when i export some dimensions to dwg, if i called the detach function on the oddbdimstyletablerecordptr after having exported the dimensions to dwg, then the result is good. but if i didn't call the detach function on the oddbdimstyletablerecordptr, the result is not good. here attached two dwg files for your reference: undetach.dwg is the result file without calling detach on oddbdimstyletablerecordptr, detached.dwg is the result file with calling detach on oddbdimstyletablerecordptr.
what does cause this strange behavior? how to fix this?
any help appreciated
attached files
calling detach() is incorrect. you should call pointer.release() or pointer = 0;
what do you mean by good or bad? do you create dimension blocks yourself?
sergey slezkin
if the dwg file is mostly like to my original file, it is good, otherwise it is bad. i always create the dimension block for the dimension in my application.
in fact, i always use the smart pointer in my application. so in my old code ( not call the detach function on the smart pointer of the dimstyle table record ), when out of the my export dimension function, the release has been called autocatically by the environment, but the result is not good.
actually, for this case, dd for vc6 works fine, but after i upgraded dd to net2003 2.1.1, the strange phenomena came up. i tried to fix this stange issue, and find that the call on detach can make the result good. as mentioned in my prior post, if i didn't call detach on the smart point of the dimstyle table record, the result is not good.
so, the issue is that what dd does in the detach function causes this difference?
dd performs dimension blocks recomputing if dimension entity or its dimension style is modified.
if resulting dimension block looks "incorrect" it means that dimension entity or dimension style data were set incorrectly - they do not match desired appearence. it's very easy to check if this is the case:
- open drawing in autocad. dimension blocks saved to file are displayed.
- select the dimension (or all of them) and change some property (color for example)
at this moment autocad will recalculate dimension block according to dimension entity and its style data.
if dimension appearance changes (except color) it means that dimension data/style and block did not match each other.
if dd calculates the block differently from autocad that means a bug in dd.
both your example files are not ok: select all dimensions in ac and change color for 255 - in both files acad recomputes the blocks.
some of radial ang angular dimension blocks in your sample are recomputed by dd incorrectly. we'll fix it.
btw, if you want to prevent recomputing of dimension blocks completely you can use dummyrecomputedimblock module instead of standard recomputedimblock. dummy module does perform recomputing.
sergey slezkin
some of radial ang angular dimension blocks in your sample are recomputed by dd incorrectly. we'll fix it.
for these issues, they have been fixed in the latest version 2.2.0 library?
this was not fixed in 2.2
sergey slezkin
if i rebuild the recomputedimblock dummy module, the resulting drx file does not contain any version info. this makes it difficult for my msi installation to correctly replace the standard recomputedimblock.drx on my customers' computers.
to build the dummyrecomputedimblock module, i rebuild the solution under the projectfiles\win32\msvc2003\extensions\dummyrecomp utedimblock_dll folder.
am i doing something wrong that causes the version information to be lost?
--------------------------
thanks,
bill
it appears that dummyrecomputedimblock.rc is not included into vc2003 and vc8 projects. please add it to the project.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】error c2664 yang686526 DirectDWG 0 2009-05-05 09:34 AM
【转帖】ambiguous call to overload functions in odstring.h yang686526 DirectDWG 0 2009-05-04 03:56 PM
【转帖】哪位高手指点一下下边lisp的怎么用 yang686526 数据库ObjectDBX 0 2009-04-28 12:13 PM
在vba里由基本三角函数导出的三角函数 yang686526 ObjectARX(AutoLISP) 0 2009-04-26 06:33 PM
哪位高手指点一下下边lisp的怎么用 yang686526 ObjectARX(AutoLISP) 0 2009-04-26 06:19 PM


所有的时间均为北京时间。 现在的时间是 10:53 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多