添加扩展字典数据
<p>添加扩展字典数据</p><p>我从外部加一个DWG文件到当前CAD数据库中;</p><p>作为一个块插入;我如何给这个块添加扩展字典数据呀; </p><p>AcDbEntityId entId,dictId;</p><p>AcDbBlockRefrence *pBlkRef=new AcDbBlockRefrence(InsertPt,blockId);</p><p>pTable->GetAt(ACDB_MODEL_SPACE,pBlkTblRcd,AcDb::kForWrite);</p><p>pBlkTblRcd->appendAcDbEntity(entId,pBlkRef);</p><p>AcDbObject* pObj;</p><p>acdbOpenObject(pObj,&entId,AcDb::kForWrite);</p><p>pObj->createExtensionDictionary();</p><p>dictId=pObj->extensionDictionary();</p><p>acdbOpenObject(pDict,dictObjId,AcDb::kForWrite);<br/> pDict->setAt(GJZName,pXrec,xRecObjId);<br/> pDict->close();</p><p> //设置扩展记录的内容;<br/> pRb=acutBuildList(AcDb::kDxfText,entData,0);//类型,值;<br/> pXrec->setFromRbChain(*pRb);<br/> pXrec->close();</p><p>各位帮帮忙吧 ;</p>
页:
[1]