void test() { AcDbDatebase *pDb=acdbCurDwg(); CString strPath = "C:\\test.dxf"; Acad::ErrorStatus es; es = pDb->dxfOut(strPath); AcDbDatabase *pDxfDB = new AcDbDatabase; acdbHostApplicationServices()->setWorkingDatabase(pDxfDB); es = pDxfDB->readDwgFile(strPath); if ( es != Acad::eOk) { AfxMessageBox("readDwgFile error!"); es = pDxfDB->dxfIn(strPath); if ( es!= Acad::eOk ) { AfxMessageBox("dxfin errofr!"); } } return TRUE; } 将dwg存为dxf,然后在打开时候有问题 |