高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】problems with oddbdimensionmeasurement90
problems with 'oddbdimension::measurement()'
problems with 'oddbdimension::measurement()'
hello. i am using 'oddbdimension::measurement()' and dwgdirect helps says:
"returns the measurement value for this dimension (dxf 42). if object is opened for write then recomputes it, else returns stored one"
but 'oddbdimension::measurement()' does not get the dxf 42; for example i have a linear dimension and it shows 5 (dimension text) its dimlfac is 0.5 and 'oddbdimension::measurement()' gets 10, it should be 5.00. ¿how can i get the dxf 42?
thanks in advance,
william g.s.
last edited by william; 24th august 2004 at 09:32 amfff">. reason: tittle was wrong
could you post the file, please.
in general, dxf 42 (and oddbdimension::measurement(), which returns value loaded from file) should take dimlfac into account. but file can contain incorrect measurement value. in this case this value can be fixed by recomputedimblock() function.
sincerely yours,
george udov
problems with 'oddbdimension::measurement()'
hello george, i send you the file, it is in autocad 2000 format.
'odamfcappdll.exe' shows fine dxf 42 but 'oddbdimension::measurement()' gets another value.
william gs.
attached files (38.8 kb, 4 views)
last edited by william; 26th august 2004 at 07:44 amfff">.
hello, william.
i can't reproduce the problem on either 1.11 or 1.12 pre-release code.
odamfcapp shows 8.3 for dxf 42 of dimension 553e, 16.5 for dimension 5566, 3.5 for dimension 5588. oddbdimension::measurement() returns the same values.
sincerely yours,
george udov
hello george, this is my code:
bool ccpsadminprds::getdimension(const cstring &strhandle, double& ddim)
{
ddim = 0;
if (strhandle.isempty())
return false;
try
{
oddbhandle handle(strhandle);
// requesting objectid
oddbobjectid dimid;
dimid = m_pdwg->getoddbobjectid(handle);
if(!dimid.isvalid())
return false;
oddbdimensionptr dimension = dimid.openobject(oddb::kforwrite);
ddim = dimension->measurement();
return true;
}
catch(...)
{
return false;
}
}
perhaps i am doing something wrong o perhaps i have and old version, how can i see the version of dwgdirect?
thanks a lot,
william gs.
i can't notice anything wrong in code.
the version of dwgdirect you can view in help/about dialog window of odamfcapp sample.
sincerely yours,
george udov
|