|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
如题,查找并试了一些方法:
1)static char pData[] = "E:\\图纸\\autoCAD\\test.dwg";
acDocManager->executeInApplicationContext(OpenDoc, (void *)pData);
void OpenDoc( void *pData)
{
AcApDocument* pDoc = acDocManager->curDocument();
if (acDocManager->isApplicationContext())
{
acDocManager->appContextOpenDocument((const ACHAR *)pData);
}
else
{
//acutPrintf("\nERROR To Open Doc!\n");
}
}
2)LPCSTR lpDocPath= "E:\\图纸\\autoCAD\\test.dwg";
LPDISPATCH pACADDisp = acedGetIDispatch(TRUE);
hr = pAcadDisp->QueryInterface(AutoCAD::IID_IAcadApplication,(void**)&pAcad);
pAcad->get_Documents(&pDocs);
VARIANT vReadOnly,vPassWord;
VariantInit(&vPassWord);
VariantInit(&vReadOnly);
hr = pDocs->Open((BSTR)lpDocPath,vReadOnly,vPassWord,&pDoc);
3)
Acad::ErrorStatus g = acDocManagerPtr()->appContextOpenDocument((ACHAR *)lpDocPath);
4)
Acad::ErrorStatus s;
s = acedSyncFileOpen((ACHAR *)lpDocPath);
调试了 都没有打开指定文档,返回值是eNotApplicable
请问如何能够正确打开指定路径图纸,望指点!谢谢
|
|