[求助]关于打开文件的问题[/我是新手]
<p>偶是新手,各位大虾帮帮忙吧。。。。多谢了~~</p><p>在autocad2006下面,想实现打开一个dwg文件的功能。代码如下:</p><p>void openDocHelper(void *dwgpath)<br/>{<br/> AcApDocument* pDoc = acDocManager->curDocument();<br/> CString* tmp = (CString*)dwgpath;<br/> if(acDocManager->isApplicationContext()){<br/> Acad::ErrorStatus result = acDocManager->appContextOpenDocument((const char *)dwgpath);<br/> if(result != Acad::eOk)<br/> acutPrintf("\nERROR: %s\n", acadErrorStatusText(result)); <br/> }else<br/> acutPrintf("\nERROR: in Document context :%s\n",acDocManager->curDocument()->fileName());<br/>}</p><p>void OpenDwg(CString dwgpath){<br/> if(acDocManager->isApplicationContext()){<br/> Acad::ErrorStatus result = acDocManager->appContextOpenDocument(dwgpath);<br/> if(result != Acad::eOk){<br/> acutPrintf("\nERROR: %s\n", acadErrorStatusText(result));<br/> } <br/> }else{<br/> acDocManager->executeInApplicationContext(openDocHelper, &dwgpath);<br/> } <br/>}</p><p>========================================</p><p>当我调用OpenDwg(some file);时,总是返回eFilerError ,这是怎么回事啊??</p><p>静待各位大虾解答,多谢了。。。</p>
页:
[1]