zzxxing 发表于 2008-7-17 11:08:00

修改线宽无法实现啊!!急急

<p>我感觉是setlineweight函数中的acdb::lineweight枚举类型的原因,谁能帮我改该啊?就是最后的那一句啊!!</p><p>void zzxchangeLineWid()<br/>{<br/>#ifdef OARXWIZDEBUG<br/>&nbsp;acutPrintf ("\nOARXWIZDEBUG - zzxchangeLineWid() called.");<br/>#endif // OARXWIZDEBUG</p><p>&nbsp;// TODO: Implement the command</p><p>&nbsp;//open the entity<br/>&nbsp;AcDbBlockTable* pBlkTbl;<br/>&nbsp;AcDbBlockTableRecord* pBlkTblRed;<br/>&nbsp;if (acdbHostApplicationServices()-&gt;workingDatabase()-&gt;getBlockTable(pBlkTbl, AcDb::kForRead) != Acad::eOk)<br/>&nbsp;{<br/>&nbsp;&nbsp;acutPrintf(_T("\n connot open the blocktable!"));<br/>&nbsp;&nbsp;return;<br/>&nbsp;}<br/>&nbsp;pBlkTbl-&gt;getAt(ACDB_MODEL_SPACE, pBlkTblRed, AcDb::kForRead);<br/>&nbsp;pBlkTbl-&gt;close();<br/>&nbsp;acutPrintf("111");</p><p>&nbsp;//build an Iterator<br/>&nbsp;AcDbBlockTableRecordIterator* pItr;<br/>&nbsp;pBlkTblRed-&gt;newIterator(pItr);<br/>&nbsp;</p><p>&nbsp;//Iterate the Entity<br/>&nbsp;for (pItr-&gt;start(); !pItr-&gt;done(); pItr-&gt;step())<br/>&nbsp;{<br/>&nbsp;&nbsp;AcDbEntity* pEnt;<br/>&nbsp;&nbsp;if (pItr-&gt;getEntity(pEnt, AcDb::kForWrite) != Acad::eOk)<br/>&nbsp;&nbsp;{<br/>&nbsp;&nbsp;&nbsp;acutPrintf(_T("\n connot open the Entity!"));<br/>&nbsp;&nbsp;&nbsp;return;<br/>&nbsp;&nbsp;}</p><p>&nbsp;&nbsp;//change the lineweight of Entity</p><p>AcDb::LineWeight lineweight= pEnt-&gt;lineWeight();</p><p>lineweight= ???????????????;//&nbsp; who can compelete it ?????</p><p><br/>&nbsp;&nbsp;if (pEnt-&gt;setLineWeight(lineweight) != Acad::eOk)<br/>&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;pEnt-&gt;close();<br/>&nbsp;&nbsp;}<br/>&nbsp;<br/>&nbsp;&nbsp;pEnt-&gt;close();<br/>&nbsp;}<br/>&nbsp;//delete the Iterator<br/>&nbsp;delete pItr;<br/>&nbsp;pBlkTblRed-&gt;close();<br/>}<br/></p>

zzxxing 发表于 2008-7-17 11:10:00

我是初学者,高手来一下啊

chinasoft668 发表于 2008-7-19 11:31:00

<p>pEnt-&gt;setLineWeight(kLnWt009) </p><p>AcDb::LineWeight是个enum,你查下帮助就知道了</p><p></p>

zzxxing 发表于 2008-7-25 16:23:00

恩,谢谢,问题已经解决
页: [1]
查看完整版本: 修改线宽无法实现啊!!急急