Community
We have a requirement to match readability of Inventor drawings to an older system by colouring circles of certain sizes (so 5mm dia =blue, 10mm = green etc).
Im down to checking if teh DrawingCurve is circular, but am stuck getting its size.
Do I need to refer to the ModelGeometry. If so I cant find how to map that to an object i can check the size of?
code excerpt so far
try
{
foreach (Sheet drawingSheet in drawingDoc.Sheets)
{
foreach (DrawingView view in drawingSheet.DrawingViews)
{
foreach (DrawingCurve dwgCurve in view.DrawingCurves)
{
if (dwgCurve.CurveType == CurveTypeEnum.kCircleCurve)
{ DrawingCurveSegment dcs = (DrawingCurveSegment)dwgCurve.Segments[1];
//Code fails here
Circle2d circle = (Circle2d)dcs;
double circleDia = Convert.ToDouble(circle.Radius.ToString("0.00")) * 2;
Color clr = m_drawingCircleColours[circleDia];
if (clr != null) dwgCurve.Color = clr;
}
}
}
}
}
Any tips greatly appreciated