用executeInApplicationContext()打开的cad文档不能成为当前文档?
<p>static char pData[]="d:\\22.dwg";<br/>acDocManager->executeInApplicationContext(createdoc,(void* )pData);<br/><br/> AcApDocument *pDoc=NULL;<br/><br/><br/><br/>AcApDocManager *pDocMgr = acDocManagerPtr();<br/>AcApDocumentIterator *pDocItr;<br/>pDocItr = pDocMgr->newAcApDocumentIterator();<br/>// AcApDocument *pDoc=NULL;<br/>CString ThisFilename;//="d:\\22.dwg";<br/><br/>for(;!pDocItr->done();pDocItr->step())<br/>{<br/> pDoc = pDocItr->document();<br/> ThisFilename = pDoc->docTitle();<br/> acutPrintf("\n"+ThisFilename); <br/> if(strcmp(pData,ThisFilename)==0)//pData是要关闭的文档的name<br/> {<br/> acutPrintf("\n 文件关闭!");<br/> pDocMgr->closeDocument(pDoc);<br/> }<br/>}<br/></p><p><font face="Verdana">用executeInApplicationContext()打开的cad文档不能成为当前文档?</font><br/></p>
页:
[1]