几何尺寸与公差论坛------致力于产品几何量公差标准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-06, 05:32 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】measurement value 9dxf 420 stored in a dimension entity

measurement value (dxf 42) stored in a dimension entity
measurement value (dxf 42) stored in a dimension entity
hello,
in acad how can i set this variable (measurement - dxf 42) to "-1.0"?
who can do this? when it may be "-1.0"?
(i have got strange file - see attachment for example. i think how treat it.)
thanks in advance.
bye.
hello andrey,
here is quotation from dxf help.
"42 - actual measurement (optional; read-only value)".
but you may set any text in property "text override".
what is problem with dimensions in your file?
best regards,
sergey z.
hello, sergey.
i'm traing read this file.
you may saw, a value of dimension has 4 digit in precision,
but dimension looks as if it has integer value - because it is only a block of dimension.
so if i get the dimension value and create dimension in my application, i won't have got the same result.
now, i think that if oddbdimension.getmeasurement() return "-1.0", it is mean - "would be better recalculate it". so if i get "-1.0", i will read text form a block dimension entity. (i can't change the drawing, and it looks like ones in acad ). but in this case i may miss some information about the text dimension (it is not right for many other drawings. in general i parse the text dimension).
quote: "42 - actual measurement (optional; read-only value)".
what will oddbdimension.getmeasurement() return, if code 42 do not present in a dimension?
all this important for me
thank you for your attention.
p.s. one of them (dim 132) haven't got one dimension line (coords are 0.0.0).
try to move one leg. i think it isn't allowably :-)
quote:
originally posted by andrey
you may saw, a value of dimension has 4 digit in precision,
but dimension looks as if it has integer value - because it is only a block of dimension.
try to update dimensions (menu dimension/update ) or chance any property dimensions will have value with 4 digit in precision.
quote:
originally posted by andrey
now, i think that if oddbdimension.getmeasurement() return "-1.0", it is mean - "would be better recalculate it".
you are right. there are two methods for read this value. getmeasurement() returns value as is and measurement() return updated value.
quote:
originally posted by andrey
quote: "42 - actual measurement (optional; read-only value)".
what will oddbdimension.getmeasurement() return, if code 42 do not present in a dimension?
dimension is inisialized by value -1.0 while creating.
quote:
originally posted by andrey
p.s. one of them (dim 132) haven't got one dimension line (coords are 0.0.0). try to move one leg. i think it isn't allowably :-)
dimension is recomputed. dwgdirect (version 2.6.1) and acad build blocks of these dimension in the same manner.
best regards,
sergey z.
you are right, with those dimensions dwgdirect works fine :-) the dwg-file is strange.
i have got one more question.
how can i know that a dimension has or hasn't the dxf code 42?
hello andrey,
getmeasurement() returns -1.0 in case dimension hasn't the dxf gc42 but
value -1.0 may exist as value dxf gc42 for dimension.
best regards,
sergey z.
is it mean that i haven't a method to find out that a dimension has the dxf code 42?
it is important for me. because many correct dimensions maight haven't got this variable.
if a dimension has'n got dxf42 code, function measurement() will add it, dosn't it?
hi,
m_dmeasurement by default has -1 value (init in constructor).
next code available in dxfinfields
code:
case 42: // actual measurement (optional; read-only value)
pimpl->m_dmeasurement = pfiler->rddouble();
if (pimpl->m_dmeasurement == 0.)
{ // this may occur in files written by previous dd versions
pimpl->m_dmeasurement = -1; // set to "invalid"
}
break;and in dxfoutfields
code:
pfiler->wrdouble(42, pimpl->m_dmeasurement);so it seems that if dxf didn't containe 42 gc, it will be added after resaving with -1 value or with 'some' value if recomputedimblock was called.
last edited by sslezkin; 13th august 2008 at 12:59 amfff">.
i am grateful for your answers.
bye.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】getting modelspace object pointer for write 9programming te yang686526 DirectDWG 0 2009-05-05 11:30 AM
【转帖】dimension bug i think yang686526 DirectDWG 0 2009-05-04 07:32 PM
【转帖】an angular dimension error yang686526 DirectDWG 0 2009-05-04 03:57 PM
【转帖】a dimension error yang686526 DirectDWG 0 2009-05-04 03:05 PM
【转帖】objectarx&dummies教程(十三)—— deriving from acdbentity yang686526 ObjectARX(C++) 0 2009-04-16 10:40 AM


所有的时间均为北京时间。 现在的时间是 06:17 PM.


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