|
发表于 2010-7-30 22:15:00
|
显示全部楼层
转帖来源:
http://hi.baidu.com/sharehelp/blog/item/9c2599fb4e382d264e4aea75.html
查看文章
【ARX】如何同时关闭cad中所有已打开的窗口(不保存更改)[原]2008-01-15 13:12
extern long acdbSetDbmod(AcDbDatabase* pDb, long newVal); // 添加acdbSetDbmod的引用
extern "C"
AcApDocumentIterator* pDociterator;
AcApDocument* pDoc;
pDociterator = acDocManager->newAcApDocumentIterator();
for (; !pDociterator->done(); pDociterator->step())
{
pDoc = pDociterator->document();
acdbSetDbmod(pDoc->database(),0); // 就是這句代碼起了決定性作用
acDocManager->closeDocument(pDoc);
}
|
|