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


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-06, 06:20 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】need dimension advice

need dimension advice
need dimension advice
i'm converting my old opendwg code over to dwgdirect, and i used to have quite a bit of control when adding an aligned dimension over the size and location of each and every element. i like that it is easier now, but i still need to be able to set the text size and arrow size when i add an aligned dimension to storage. can anyone advise how to do it? there do not appear to be any direct functions... i probably have to monkey with styles somehow?
it seems you should study dimension styles and dimension variables (refer to autocad help). the apperance of dimension block depends on near 50 different parameters.
there is dimension style concepts (dimension style is set of values of dimension parameters).
oddbdimension entity has methods setdimensionstyle (for setting style for the dimension) and setdimvar (var is an dimension variable; for setting parameter override).
sincerely yours,
george udov
more advice?
yes, i need to learn more about those styles. where is the best place to get the autocad help you mention? i've heard people refer to the autocad documentation (for arx, i suppose?), but i've only used opendwg, and programmed based on their sample code (don't have autocad... just lt). where can i find more? the dwgdirect examples do not seem to address dimension styles or much else regarding dimensions.
also, i do not see a setdimvar in the dwgdirect help file?
regrettably, dwgdirect help file doesn't describe meaning of each dimension variable. dimension variables are described in autocad user documentation, not in arx reference. also you can type something like "autocad dimension style variables" in any internet search engine, and you'll get a lot of links to documentations.
sincerely yours,
george udov
dimension variables in opendwg
ok, i've got an extremely large book now with dimension variables, but i am still at a loss as to what sort of coding would be required to set the text height for a dimension that i am adding. i see very little sample code dealing with these dimension details. with opendwg it was easy to control everything, because you had to draw everything yourself!
my current task is to convert some opendwg code that translated our proprietary cad dimensions one at a time into dwgdirect. any advice on writing code to set or override the text height, arrow size, etc. for each dimension would be greatly appreciated.

with dwgdirect you can generate dimension blocks by yourself too. in this case you should call setgraphicsmodified(false); to avoid automatically recomputing of dimension block by dwgdirect.
but recomputing dimension blocks by yourself is kind of cheat. because autocad in some cases (for example, if you change color of dimension) will recompute block, basing on dimension variables.
so correct way is to set up dimension variables. to set text size, use dimtxt variable (pdim->setdimtxt method). to set arrows size, use dimasz variable (pdim->setdimasz method). these methods presents for all kinds of dimension.
sincerely yours,
george udov
last edited by george udov; 7th april 2004 at 01:06 amfff">.
don't forget the dimscale variable multiplies the dimtxt (and every other linear) dimension variable.
thanks...
that was very useful.
quote:
originally posted by george udov
with dwgdirect you can generate dimension blocks by yourself too. in this case you should call setgraphicsmodified(false); to avoid automatically recomputing of dimension block by dwgdirect.
but recomputing dimension blocks by yourself is kind of cheat. because autocad in some cases (for example, if you change color of dimension) will recompute block, basing on dimension variables.
so correct way is to set up dimension variables. to set text size, use dimtxt variable (pdim->setdimtxt method). to set arrows size, use dimasz variable (pdim->setdimasz method). these methods presents for all kinds of dimension.
false method name
quote:
originally posted by george udov
with dwgdirect you can generate dimension blocks by yourself too. in this case you should call setgraphicsmodified(false); to avoid automatically recomputing of dimension block by dwgdirect.
but recomputing dimension blocks by yourself is kind of cheat. because autocad in some cases (for example, if you change color of dimension) will recompute block, basing on dimension variables.
so correct way is to set up dimension variables. to set text size, use dimtxt variable (pdim->setdimtxt method). to set arrows size, use dimasz variable (pdim->setdimasz method). these methods presents for all kinds of dimension.
setgraphicsmodified(false); means
recordgraphicsmodified (false);
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】measurement value 9dxf 420 stored in a dimension entity yang686526 DirectDWG 0 2009-05-06 05:32 PM
【转帖】an angular dimension error yang686526 DirectDWG 0 2009-05-04 03:57 PM
【转帖】a dimension error yang686526 DirectDWG 0 2009-05-04 03:05 PM


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


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多