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

copy a layout & create a new layout
copy a layout & create a new layout
hi,
i am looking for a a way (in dwgdirect c++) of copying an existing layout with all it's enties and then creating an identical new layout, more or less how layouts are copied in autocad.
any ideas?
marc
i think there is no direct way to do this - there is some class oddblayoutmanagerreactor, which has functions layoutcopied and layouttobecopied, but i think it is simply not used in the dwgdirect core.
you should create manually a layout, then use eighter the oddbobject::copyfrom function to copy the original contents to the copy (but be careful not to duplicate the record name in the layout dictionary), or manually copy property by property of the oddbplotsettings and oddblayout classes.
after that use deepclone to copy the entities from the source block to the newly created block, if you need them (entities) to be copied too.
best regards
chudomir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)