{ AcCmColor color1,color2,color3; color1.setColorIndex(1); color2.setColorIndex(2); color3.setColorIndex(3); AcDbAlignedDimension* p = new AcDbAlignedDimension(); p->setXLine1Point(AcGePoint3d(0,0,0)); p->setXLine2Point(AcGePoint3d(0,100,0)); p->setDimLinePoint(AcGePoint3d(500,0,0)); p->setDimensionText(_T("TEST")); p->setDimclrt(color1); p->setDimclre(color2); p->setDimclrd(color3); CAddEntity().AddEntity(p); p->close(); }