高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】finding the dim text default position
finding the dim text default position
finding the dim text default position
pdim->isusingdefaulttextposition() tells us if the text of a dimension has been moved from it's standard (default) position and dimtextmidpt() gives us the modified text position
but
does dd provides a method to know what is the standard text position as if it had not been moved (something like dimtextstdpt() fff"> ?
thanks
jp
i found a solution to this problem , deepcloning the dim, reseting text position
with usedefaulttextposition() and getting the text position textposition() :
oddbidmappingptr powneridmap = oddbidmapping::createobject();
powneridmap->setdestdb(dwg.pdb);
oddbobjectptr pentlconed= pent->deepclone(*powneridmap);
oddbrotateddimensionptr pentdimcloned= pentlconed;
pentdimcloned->usedefaulttextposition();
pentdimcloned->recomputedimblock(true);
odgepoint3d dimtextstdpt= pentdimcloned->textposition();
but this is really heavy !...
is there a better way do to this ?
thanks
helo dublin,
unfortunately there is no something like dimtextstdpt(). default text position isn't strored in dimension entity.your may get it by recompute dimension with corresponding setting.
best regards,
sergey z.
hello serguey,
i can get the default text position like you suggest ( and how i did : cloning, modifiying and recomputing the dim block)
but as this very heavy, and as this function might be usefull to some others, may i suggest that you add it to the methods of the dim classes,.
you probably have inside dd all the routines to do this easily ...
thanks for your continuous support
jp
|