查看单个帖子
旧 2009-05-04, 05:31 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)