- 积分
- 52
- 明经币
- 个
- 注册时间
- 2011-2-16
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
AcGePoint3d ptStart(0, 0, 0); //如何将两指定点改为键盘输入数据。即输入两点坐标,程序自动做线段。
AcGePoint3d ptEnd(1000, 1000, 0);
AcDbLine *pLine = new AcDbLine(ptStart, ptEnd);
AcDbBlockTable *pBlockTable;
acdbHostApplicationServices()->workingDatabase()
->getBlockTable(pBlockTable, AcDb::kForRead);
AcDbBlockTableRecord *pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord,
AcDb::kForWrite);
AcDbObjectId lineId;
pBlockTableRecord->appendAcDbEntity(lineId, pLine);
pBlockTable->close();
pBlockTableRecord->close();
pLine->close(); |
|