glhu3 发表于 2005-8-31 10:32:00

敬请高手们指点迷津,多谢多谢多多谢!

<P>AcDbBlockTableRecord *pNewBlock=new AcDbBlockTableRecord();<BR>pNewBlock-&gt;setName("newblock");</P>
<P>AcDbBlockTable *pT;<BR>acdbHostApplicationServices()-&gt;workingDatabase()-&gt;getSymboltable(pT,AcDb::kForWrite);</P>
<P>pT-&gt;add(pNewBlock);<BR>pT-&gt;close();</P>
<P>AcDbLine *pL=new AcDbLine();<BR>pL-&gt;setStartPoint(AcGePoint3d(100,100,0));<BR>pL-&gt;setEndPoint(AcGePoint3d(400,100,0));<BR>pNewBlock-&gt;appendAcDbEntity(pL);</P>
<P>pL-&gt;close();<BR>pNewBlock-&gt;close();</P>
<P>以上代码创建了一个名为newblock的块,块中画了一条直线,上述代码编译后(arx动态库)在autocad2002中加载后,运行,在autocad中新块确实产生了,然而没有直线显示出来,这个块好象是一个创建后又被删除等待purge的那种块,请问这是什么原因?</P>
页: [1]
查看完整版本: 敬请高手们指点迷津,多谢多谢多多谢!