- 积分
- 4356
- 明经币
- 个
- 注册时间
- 2002-10-3
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-3-26 17:38:00
|
显示全部楼层
AcDbObjectId createLine() { AcGePoint3d startPt(-2.4, 0.0, 0.0); AcGePoint3d endPt(2.4, 0.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; }
|
|