查看单个帖子
旧 2009-05-04, 07:45 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】dimtfilldimtfillclr

dimtfill/dimtfillclr
dimtfill/dimtfillclr
are the methods implemented for an oddbdimension entity?
it appears the stubs are there, and i can call them, but setting dimtfill to 1 leads to no effect on the autocad drawing.
code:
pdim->setdimtfill((odint16)1);
setting dimtfill to 2 and specifying a color has no effect either:
code:
pdim->setdimtfill((odint16)2);
odcmcolor clrfill;
clrfill.setcolormethod(odcmentitycolor::colormethod::kbycolor);
clrfill.setrgb(0,255,0);
pdim->setdimtfillclr(clrfill);
when i manually change the attribute in autocad, it works as expected.
i'm using version 2.4.1...
hello,
this methods are implemented for an oddbdimension entity. i have added your code to odwriteex example and it has expected affect.
note this variables are supported start from r21 (acad2007) dwg format.
best regards,
sergey z.
hmm,
the drafter i am talking too says the attribute exists in acad 2006.. or more like the property is available on the dimension entity. did autocad try to "fake" it in previous versions?
as well, is there any good reference to all the variables and which versions they officially became supported in?
quote:
originally posted by jacobhoover
hmm,
the drafter i am talking too says the attribute exists in acad 2006.. or more like the property is available on the dimension entity. did autocad try to "fake" it in previous versions?
i am sorry. i was not absolutely right. possibility use background color was in acad 2006 too but it was supported via xdata ( there was not this variable). dwgdirect supports it too.
quote:
originally posted by jacobhoover
as well, is there any good reference to all the variables and which versions they officially became supported in?
you use "dbdimvar.h" from objectarx acad or "dimvardefs.h" from dwgdirect.
best regards,
sergey z.
quote:
originally posted by sergey z.
i am sorry. i was not absolutely right. possibility use background color was in acad 2006 too but it was supported via xdata ( there was not this variable). dwgdirect supports it too.
you use "dbdimvar.h" from objectarx acad or "dimvardefs.h" from dwgdirect.
a) is there any documentation/examples of this "xdata method"?
b) i'm still not able to get the desired output, even when saving the file as a 2007 dwg file. (oddb::savetype filetype = oddb::kdwg, oddb:wgversion outver = oddb::vac21)
the only thing i can think of is i am not creating a new database, but rather starting from a "template" dwg file, which is saved in autocad 2000 format... but i was under the impression that all opendwg calls would treat the database as the latest version, and only when persisting to file would it down grade.
looking at my output drawing, i am not able to see any reference to the fact this property is set...
code:
var_def(odint16, tfill, 69, (0), (0), (), validaterange(0, 2))
looking at the file in odamfcapp, i "assume" that when looking at the dimension entity, i should see a property id of 69 set to 1, but i don't. i've updated my code to assert it is in fact being set...
code:
pdim->setdimtfill((odint16)1);
odint16 idim = pdim->dimtfill();
_asserte(idim == 1);
attached files (73.8 kb, 1 views)

last edited by jacob.hoover@greenheck.com; 27th september 2007 at 10:36 amfff">.
quote:
originally posted by jacobhoover
a) is there any documentation/examples of this "xdata method"?
it is method of storing data. before version r21 these data are stored in xdata (dwg/dxf). it are stored as dimension variables start r21. in any case you needn't additional trouble about it.
quote:
originally posted by jacobhoover
looking at the file in odamfcapp, i "assume" that when looking at the dimension entity, i should see a property id of 69 set to 1, but i don't. i've updated my code to assert it is in fact being set...
i am not able to reproduce your behavior. there is no problem to set dimtfill and dimtfillclr variables. i have added your code in oneditrecomputedimblock() (odmfcappdll project, dwgview.cpp). as result there is attached file which was saved by odmfcapp.
attached files (26.7 kb, 2 views)

best regards,
sergey z.

i found my issue.. i was overwriting the changes with a subsequent call to: setdimstyledata.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)