我想打开一个dwg,然后保存关闭,再处理另一个。。。。同步处理- [CommandMethod("MyOpen")]
- public void open()
- {
- DocumentCollection acDocMgr = Application.DocumentManager;
- for (int i = 0; i < 10; i++)
- {
- Document doc = acDocMgr.Open("C:\\template500.dwg", false);
- acDocMgr.MdiActiveDocument = doc;
- using (doc.LockDocument())
- {
- doc.Database.SaveAs("C:\\" + i + ".dwg", DwgVersion.AC1800);
- }
- doc.CloseAndDiscard(); //*****关闭时出错
- }
- }
我用的cad map 2015
我要怎么改啊
|