高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】cannot write out dwg.. but dxf works fine
cannot write out dwg.. but dxf works fine
cannot write out dwg.. but dxf works fine
afx_manage_state(afxgetstaticmodulestate())
begin_sexception_handling
// create a custom hostappservices object.
odrxobjectimpl<customdwghostservices> svcs;
/*customdwghostservices derived from oddbhostappservices, oddbhostappprogressmeter*/
m_phostservices = svcs.createobject ();
// create a default database
m_pdb = m_phostservices->createdatabase(true, (usemetric == variant_true) ? oddb::kmetric : oddb::kenglish);
odstring filename = "c:\\test.dwg";
odwrfilebuf outfile (filename.c_str ());
m_pdb->writefile (&outfile, oddb::kdwg, oddb::vac15, true, 0);
return s_ok;
end_sexception_handling
please let me know why this code fails. it works fine if i am writing out a dxf file. what could be the difference between writing dwg & dxf.. this code worked fine in 1.14.
thanks.
i could export the files to dwg too now.
thanks
|