luckstarzhx 发表于 2007-12-22 09:58:00

添加扩展字典数据

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