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