TA的每日心情 | 开心 半小时前 |
---|
签到天数: 20 天 [LV.4]偶尔看看III
管理员
- 积分
- 1393
|
void makeRotatedDim(AcGePoint3d pt1, AcGePoint3d pt2, double dAngle)
{
Acad::ErrorStatus es;
AcGePoint3d ptMid = getMidPoint(pt1, pt2); // getMidPoint is one of my simple utilities
AcDbBlockTableRecord* blkRec;
AcDbDatabase *pCurDb;
pCurDb = acdbHostApplicationServices()->workingDatabase();
AcDbRotatedDimension* dim = new AcDbRotatedDimension;
dim->setXLine1Point(pt1);
dim->setXLine2Point(pt2);
dim->setRotation(dAngle);
dim->setHorizontalRotation(dAngle);
dim->useDefaultTextPosition();
dim->setDatabaseDefaults();
es = acdbOpenObject(blkRec, pCurDb->currentSpaceId(), AcDb::kForWrite);
acedAlert(acadErrorStatusText(es));
es = blkRec->appendAcDbEntity(dim);
if(es!=Acad::eOk) acutPrintf(采用T("\nError adding entity (%d)"), es);
blkRec->close();
dim->close();
return;
} // end of function makeRotatedDim() |
|