Hello Autodesk!
I worked a little harder and found a solution. Below code snippet:
DrawingDocument doc = (DrawingDocument)m_inventorApplication.ActiveDocument;
HighlightSet highlight = doc.CreateHighlightSet();
DrawingView view = (DrawingView)m_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select the view!");
ObjectCollection items = m_inventorApplication.TransientObjects.CreateObjectCollection();
DrawingCurveSegment body = (DrawingCurveSegment)m_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Select the bodies!");
DrawingCurve parent = body.Parent;
try
{
EdgeProxy oModelprox = (EdgeProxy)parent.ModelGeometry;
ComponentOccurrence compDef = oModelprox.ContainingOccurrence;
DrawingCurvesEnumerator oCurveEnum = view.DrawingCurves[compDef];
foreach (DrawingCurve oCurve in oCurveEnum)
{
foreach (DrawingCurveSegment oSegment in oCurve.Segments)
{
items.Add(oSegment);
highlight.AddItem(oSegment);
}
}
}
catch (Exception)
{
}
I hope it helps!
Regards!