xiagood 发表于 2004-9-4 09:12:00

怎样用一个循环语句来控制建层

各位大师:<BR>   大家好。<BR>我想用一个循环语句来控制建一些预定的层。不知怎样写。请指教。<BR>void createNewLayer()<BR>{<BR>                       int i, j;<BR>                       AcDbLayerTable *pLayerTable;<BR>                       acdbHostApplicationServices()-&gt;workingDatabase()<BR>                                                       -&gt;getSymbolTable(pLayerTable, AcDb::kForWrite);<BR>               for(i=0;i&lt;21;i++)<BR>       {                <BR>                       AcDbLayerTableRecord *pLayerTableRecord =<BR>                                                       new AcDbLayerTableRecord;<BR>       }<BR>                       pLayerTableRecord-&gt;setName("Axis");<BR>                       pLayerTableRecord-&gt;setName('wall");<BR>                       ................<BR>                        for(i=0;i&lt;=21;i++)<BR>               {<BR>                       pLayerTable-&gt;add(pLayerTableRecord);<BR>                       pLayerTable-&gt;close();<BR>                       pLayerTableRecord-&gt;close();<BR>               }<BR>}<BR>这样用不了。。初学ARX。谢谢.
页: [1]
查看完整版本: 怎样用一个循环语句来控制建层