![]() |
【转帖】c#的form中能否调用arx函数?
c#的form中能否调用arx函数?
www.dimcax.com c#的form中能否调用arx函数? private void button1_click(object sender, eventargs e) { class1 a = new class1(); a.createemployee(); } namespace test { class class1 { public void createemployee() // this method can have any name { database db = new autodesk.autocad.databaseservices.database(); transaction trans = db.transactionmanager.starttransaction(); try { } catch { } finally { trans.dispose(); } db.saveas("3.dwg", dwgversion.current); } 这样访问提示我system.io.fillenotfoundexception:"被指定了的组件没找到" 请指点!!万分感谢! 如果你是不启动autocad是没有办法的,必须是在cad环境下。 c#最适合开发autocad,因为它拥有vb容易的特点,却具有vc++的强大功能。 感谢管理员的回答,如果我要自己保存成dwg文件有什么办法吗?请指教! 夜色 得到当前数据库. 然后调用database类的saveas()方法即可 saveas()函数原型: saveas(string filename, dwgversion version) |
| 所有的时间均为北京时间。 现在的时间是 06:37 AM. |