When you add DrawingCurve to SelectionSet like below, you will receive a failure.
private void AddDrawingCurvesToSelectSet() { // assume the Inventor application is got // and a drawing document with some // drawing views is opened. DrawingDocument oDrawingDoc = m_inventorApp.ActiveDocument as DrawingDocument; Sheet oActiveSheet = oDrawingDoc.ActiveSheet; DrawingView oView = oActiveSheet.DrawingViews[1]; DrawingCurvesEnumerator oCurves = oView.get_DrawingCurves(null); SelectSet oSel = oDrawingDoc.SelectSet; oSel.Clear(); //it failed //oSel.Select(oCurves[1]); }
It is the designed behavior that DrawingCurves are not supported to be added to the SelectionSet directly Drawing curves are not selectable entities – only curve segments are. There shouldn’t really be a need to select a drawing curve over a segment. Selection of a segment provides additional information.
private void AddDrawingCurvesToSelectSet() { // assume the Inventor application is got // and a drawing document with some // drawing views is opened. DrawingDocument oDrawingDoc = m_inventorApp.ActiveDocument as DrawingDocument; Sheet oActiveSheet = oDrawingDoc.ActiveSheet; DrawingView oView = oActiveSheet.DrawingViews[1]; DrawingCurvesEnumerator oCurves = oView.get_DrawingCurves(null); SelectSet oSel = oDrawingDoc.SelectSet; oSel.Clear(); for (int i = 1; i

Leave a Reply