更新扩展数据后保存文件出错
<p>AcDbDatabase *pDb = new AcDbDatabase(Adesk::kFalse);<br/> es = pDb->readDwgFile(szDwgFile);<br/> if (es == Acad::eOk)<br/> { <br/> UnlockAllLayer(pDb);</p><p> pDb->getSymbolTable(pBlkTbl,AcDb::kForRead);<br/> pBlkTbl->getAt(ACDB_MODEL_SPACE,pBlkTblRcd,AcDb::kForWrite);<br/> pBlkTbl->close();<br/> pBlkTblRcd->newIterator(pBlkTblRcdItr);<br/> for (pBlkTblRcdItr->start();!pBlkTblRcdItr->done();pBlkTblRcdItr->step())<br/> {<br/> <br/> es = pBlkTblRcdItr->getEntity(pEnt,AcDb::kForWrite);<br/> if (es != Acad.ErrorStatus::eOk) continue;<br/> pRb = pEnt->xData("SOUTH");<br/> if (pRb == NULL) continue;<br/> while ((rchain = pRb->rbnext))<br/> {<br/> if (rchain->restype == 1000)<br/> {<br/> strcpy(szVal,rchain->resval.rstring);<br/> strcpy(rchain->resval.rstring, "test");<br/> break;<br/> }<br/> }</p><p> es = pEnt->upgradeOpen();<br/> es = pEnt->setXData(pRb);<br/> es = pEnt->close();<br/> acutRelRb(pRb); <br/> } <br/> }<br/> es = pDb->saveAs("D:\\3.DWG");//(LPTSTR)(LPCTSTR)szCurFilePath//保存出现错误</p><p>错误为:文件写入/读出出错</p>
页:
[1]