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

yang686526 2009-05-06 05:43 PM

【转帖】merging dwfdwg files
 
merging dwf/dwg files
merging dwf/dwg files
hi,
i have 2 separate dwf files, which contain different layers for the same drawing. i want to merge them into one dwf file (one page/layout, not one dwf with separate pages).
currently, i convert them to dwg files, and then use oddbdatabase.insert method:
code:
oddbdatabaseptr poutputdb = svcs.createdatabase();
oddbdatabaseptr pdb = svcs.readfile(搈yfile.dwg? false, false);
// or: poutputdb->insert(dd_t("mylayer"), pdb)
poutputdb->insert(odgematrix3d::kidentity, pdb);
oddbdatabaseptr pdb2 = svcs.readfile(搈yfile2.dwg? false, false);
poutputdb->insert(odgematrix3d::kidentity, pdb2);
poutputdb->writefile(搊utput.dwg? oddb::savetype::kdwg, oddb::dwgversion::vac21);however, this doesn抰 work ?it produces an empty file.
my question is this:
how can i merge two dwf files? (whether it抯 by directly manipulating the dwf files, or converting them to dwg files and then merging them)
i抳e attached the two 2 dwf files (also after their conversion to dwg).
thanks,
yaron
attached files
first of all, yes dwf import is designed to combine dwf files. to determine which layout given sheet corresponds to, "layout name" property is used. autocad and recent versions of our dwf export set this property when creating dwf file. in the files you sent this property is empty and dwf sheets go into layouts "layout2" and "layout3" (that's why insert didn't work).
you may either patch dwf import to use dwf sheet title when "layout name" property is empty (that fix will be included in the next release), or combine layouts 2 and 3 of the imported dwfs obtained using current version of dwf import.
vladimir


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