菜鸟求助:如何绘制一条直线!
初学ARX,想从最基本的学起,但是连绘制一条直线的原代码也找不到,求大侠们帮忙!<BR>小弟在这里拜谢了! AcDbObjectId<BR>createLine()<BR>{<BR> AcGePoint3d startPt(-2.4, 0.0, 0.0);<BR> AcGePoint3d endPt(2.4, 0.0, 0.0);<BR> AcDbLine *pLine = new AcDbLine(startPt, endPt);AcDbBlockTable *pBlockTable;<BR> acdbHostApplicationServices()->workingDatabase()<BR> ->getSymbolTable(pBlockTable, AcDb::kForRead);
AcDbBlockTableRecord *pBlockTableRecord;<BR> pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord,<BR> AcDb::kForWrite);<BR> pBlockTable->close();
AcDbObjectId lineId;<BR> pBlockTableRecord->appendAcDbEntity(lineId, pLine);
pBlockTableRecord->close();<BR> pLine->close();
return lineId;<BR>}<BR> 谢谢了,有了你的帮助可以开始我的进一步的学习了
页:
[1]