admin 发表于 2024-3-14 20:12:38

[每日一码] 关闭包括当前文档在内的所有文档

// Close the other documents
AcApDocumentIterator *Iter
                  = acDocManager->newAcApDocumentIterator();
while(!Iter->done())
{
    if (Iter->document()!=acDocManager->curDocument())
    {
      acDocManager->closeDocument(Iter->document());
    }
    Iter->step();
}
delete Iter;

// Now close the current document
::acDocManagerPtr()->appContextCloseDocument(acDocManager->curDocument());
页: [1]
查看完整版本: [每日一码] 关闭包括当前文档在内的所有文档