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