vten100 发表于 2010-6-27 12:12:00

用executeInApplicationContext()打开的cad文档不能成为当前文档?

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