高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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.
|