McDbXline类表示AutoCAD中的XLINE实体类型。一个xline实体是在两个方向都无限延伸的一条直线
class McDbXline : public McDbCurve;
McDbXline.h
例如:绘制一条XLine
AcDbObjectId CTestCommands::AddToModelSpace(AcDbEntity* pEntity,AcDbDatabase* pDatabase,bool isAutoClose) { AcDbObjectId objId; AcDbBlockTableRecordPointer spBlkRec(ACDB_MODEL_SPACE,pDatabase,AcDb::kForWrite); if(spBlkRec.openStatus() != Acad::eOk) return AcDbObjectId::kNull; spBlkRec->appendAcDbEntity(objId, pEntity); if(isAutoClose) pEntity->close(); return objId; } McDbXline* pXLine = new McDbXline; pXLine->setBasePoint(bastPt); pXLine->setUnitDir(vecDir); return AddToModelSpace(pXLine,pDatabase,true);