几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】copy a layout create a new layou (http://www.dimcax.com/hust/showthread.php?t=15494)

yang686526 2009-05-04 06:18 PM

【转帖】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


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