高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|