- 积分
- 12459
- 明经币
- 个
- 注册时间
- 2003-5-28
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-9-7 21:24:00
|
显示全部楼层
回复
参考:
创建line:
AcDbObjectId createLine() { AcDbDatabase *pCurDb; pCurDb = acdbHostApplicationServices()->workingDatabase();
AcGePoint3d startPt(4.0,2.0,0.0); AcGePoint3d endPt(10.0,7.0,0.0); AcDbLine *pLine = new AcDbLine(startPt,endPt);
AcDbBlockTable *pBlockTable; pCurDb->getBlockTable(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; } |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
x
|