几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】dimfit and r14 files (http://www.dimcax.com/hust/showthread.php?t=15726)

yang686526 2009-05-04 07:43 PM

【转帖】dimfit and r14 files
 
dimfit and r14 files
dimfit and r14 files
hello,
reading "dimatfit" and "dimtmove" variables work fine for autocad 2000 and 20004 files, but it doesn't work for r14 files.
in r14, there is no "dimatfit" and "dimtmove", but instead of these two variables there is only "dimfit" variable.
while i could not found a method, which reads "dimfit" variable, i suppose, that it should be converted automatically into "dimatfit" and "dimtmove".
when i read "dimatfit" and "dimtmove" variables from r14 files, i get always their default values:
dimatfit = 3
dimtmove = 0
how can i get the correct values of "dimatfit" and "dimtmove" variables from r14 files?
regards, tomaz.
while loading r14 files dd realy converts dimfit to dimatfit and dimtmove:
dimfit: 0, 1, 2, 3, 4, 5, others
dimatfit: 0, 1, 2, 3, 3, 3, 3
dimtmove: 0, 0, 0, 0, 1, 2, 0
oddmutils namespace declared in dbdimstyletablerecord.h
contains conversion methods between old and new values.
oddbdatabase class also contains dimfit() and setdimfit() methods.
sergey slezkin
hello sergey,
thanks for really quick response.
i found out, that dwgdirect library really converts dimfit into proper dimatfit and dimtmove variable, if dimfit is set in dimension style. but, if dimfit is changed in dimension overrides, it is not taken into account.
my code is like this:
oddbdimstyletablerecord dimstyle;
pdiment->getdimstyledata(&dimstyle);
cout << dimstyle.dimatfit() << endl;
cout << dimstyle.dimtmove() << endl;
as i understand dwgdirect reference, getdimstyledata fills the dimstyle class with dimension style and overrides. so, it should return dimstyle data used for this dimension.
i am sending you the file, where variable dimfit is set to 3 in dimension style, and to 1 in dimension overrides.
dwgdirect library returns
dimatfit = 3
dimtmove = 0
(apparently it does not convert dimfit from dimension overrides.)
is this a bug in dd, or should i read overrides in a different way?
regards, tomaz
attached files (12.0 kb, 6 views)

this is dd bug.
sergey slezkin


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