图形忙 是什么原因引起的啊 ?
DocumentCollection docs = AcadApp.DocumentManager;foreach (Document doc in docs) {
AcadDocument acadDoc = doc.AcadDocument as AcadDocument;
string docFullName = acadDoc.FullName;
if (string.IsNullOrEmpty(docFullName)) {
continue;//如果是还没有存储路径的文档就不去处理它
}
if (!string.IsNullOrEmpty(doc.CommandInProgress)) {
acadDoc.SendCommand("\x03\x03");
}
try {
doc.CloseAndDiscard();
} catch (System.Exception ex) {
MessageBox.Show(ex.Message);
}
}
页:
[1]