几何尺寸与公差论坛------致力于产品几何量公差标准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, 09:58 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】please advise on easiest way to modify a drawing

please advise on easiest way to modify a drawing
please advise on easiest way to modify a drawing
hi
i want to write a reasonably simple program (the basic project is already compilable) that updates a drawing.
what i have is a drawing with lots of different colours objects on the same layers. based on the layer and colour of the object, i can determine what it should be.
for example, imagine i have a layer in a drawing called "18" with some entities on it. maybe some are red, blue and green. now i know that the entities on layer 18 that are red are "lamp posts" and the blue ones are "gate posts" etc etc.
so, to begin with, i must iterate the model space entities, and for each entity i can get its layer name and colour (ofcourse, the colour might be bylayer, in which i must get the true colour, but they should all be hardcoded to a colour).
then, using this layer name and colour i can find the correct layer name for it.
this is the aspect of the program i want to talk about. the input drawing will have numerical layers. the output will be alphanumeric. so, can i simply modify the existing database in memory? can i determine the right layer, add it to the existing database if required, and update existing entity? this would save me the need to creating a new drawing and duplicating entities into the new drawing.
i would appreciate advice on this please before i go head deep into the sea...
thanks in advance.
andrew
yes you can modify loaded database in memory. add new layers, alter entity's layer and purge old layers.
but you need to iterate not only through model space but all other blocks too.
sergey slezkin
last edited by mmuratov; 2nd february 2004 at 08:16 amfff">.
the data in this drawing is only polylines, point, circles etc etc. there are no complex objects like inserts in it.
quote:
originally posted by ajtruckle
the data in this drawing is only polylines, point, circles etc etc. there are no complex objects like inserts in it.
what you meant to say is "the data in this drawing should contain only polylines, points, circles, etc., and should not contain complex objects such as inserts.
the fact of the matter is the drawing could contain such objects, and you have to be prepared to deal with them.
in the language of programmers, 'should' and 'should not" should not exist; only 'can' and 'cannot'.
for these reasons alone, you must process all of the blocks (including modelspace) in the block table.
we don't really need to argue about wording here do we? i am writing a utility for working with data produced by ourselves in microstation. our software systems do not support the additional features. yes, i admit they can be there, but it would be wrong.
at the most, all i would do is leave the objects untouched and warn user.
if i were doing a full blown shareware program, or if we were able to place inserts in within our digital image workstations, then fair enough.
but this routine is for internal use within my office, so i do know what is and is not allowed.
it was within this context that i said what i did.
but in general terms, ofcourse i agree with you.
andrew
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】value of drawing check yang686526 American standards 0 2009-05-04 11:08 AM
【转帖】good example of engineering drawing yang686526 American standards 0 2009-04-29 08:15 PM
【转帖】drawing number system - do you still indicate dwg sie in the yang686526 American standards 0 2009-04-29 07:45 PM
【转帖】decimal dimensioningfractional equivalents yang686526 American standards 0 2009-04-29 07:28 PM
【转帖】asme - where to star yang686526 American standards 0 2009-04-29 07:28 PM


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


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