- 积分
- 613
- 明经币
- 个
- 注册时间
- 2003-12-13
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
本帖最后由 作者 于 2004-2-24 11:03:50 编辑
画了两条直线,怎样标注它们得尺寸啊。要加些什么代码?
double x1,x2,x3,y1,y2,y3;
AcGePoint3d pt1(x1,y1,0),pt2(x2,y2,0),pt3(x3,y3,0); AcDbLine* pLine1=new AcDbLine(pt1,pt2); AcDbLine* pLine2=new AcDbLine(pt2,pt3);
AcDbDatabase *pCurDb; AcDbBlockTable *pBlockTable; pCurDb=acdbHostApplicationServices()->workingDatabase();
pCurDb->getSymbolTable(pBlockTable,AcDb::kForRead); AcDbBlockTableRecord *pBlockTableRecord; pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord,AcDb::kForWrite); pBlockTable->close();
AcDbObjectId lineId; pBlockTableRecord->appendAcDbEntity(lineId,pLine1); pBlockTableRecord->appendAcDbEntity(lineId,pLine2); pBlockTableRecord->close(); pLine1->close(); pLine2->close(); |
|