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

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】import radial dimensions (http://www.dimcax.com/hust/showthread.php?t=16853)

yang686526 2009-05-06 03:44 PM

【转帖】import radial dimensions
 
import radial dimensions
import radial dimensions
hello,
i'm trying to import the attached dwg, but texts in radial dimensions are enormous. to retrieve texts height i use oddbradialdimensions::dimtxt(): is it correct?
if i try to import the dwg with odamfcapp it's ok...
thanks.
andrea
attached files
dimtxt() is the right method for getting dimension text height. the height will be returned from xdata override attached to the dimension or if it's absent from dimension style.
dimensions in your file realy have huge text size and arrow size. autocad and odamfcapp render dimensions using their block (*dxx) representation saved to file. in your file dimension blocks are ok and they get rendered. but dimstyle variables are too large.
you can try an experiment: open your file in autocad, click a dimension - block reference will be selected. explode it. repeat these actions untill you get dimension entity selected. at this moment autocad will recalculate dimension block. its arrows and text height will be huge.
sergey slezkin
directly read dimension blocks
is it possible to read heights directly from dimension blocks, like autocad and odamfcapp do?
thanks.
andrea
autocad and odamfcapp do not "get" text height from dimension block. they simply draw the block then they need to draw dimension.
if you need to get only geometry of dimension entity you can get dimension's block with name "*dnn" and parse it (line, solid, mtext entities) etc.
but your problem is caused by invalid file. dimension variables and the contents of dimension block do not match each other.
note that dimension block may be absent in file or it may be incorrect. so getting text height from mtext entity inside dimension block is not the correct way.
sergey slezkin


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