- 积分
- 293
- 明经币
- 个
- 注册时间
- 2005-3-30
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
给出创建源代码:
AcDbObjectId createLine() { AcGePoint3d startPt(4.0,2.0,0.0); AcGePoint3d endPt(10.0,7.0,0.0); AcDbLine *pLine=new AcDbLine(startPt,endPt); AcDbBlockTable *pBlockTable; acdbHostApplicationServices()->workingDatabase() ->getSymbolTable(pBlockTable,AcDb::kForRead); AcDbBlockTableRecord *pBlockTableRecord; pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord, AcDb::kForWrite); pBlockTable->close(); AcDbObjectId lineId; pBlockTableRecord->appendAcDbEntity(lineId,pLine); pBlockTableRecord->close(); pLine->close(); return lineId; }
那位知道怎么在主函数中区调用它 并能在CAD中画出一条直线. |
|