Message 1 of 2
Finding the length of a bendline in a drawingview
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm looking for a way to get the length of bendlines in a drawing.
Reason it because I have small bendlines that I want to ignore. All other bendlines need a bendnote.
Now.... I can't get the length of the bendlines no matter what I try and I'm at a loss. HALP!
For Each oView In oSheet.DrawingViews For Each oCurve In oView.DrawingCurves If oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendDownEdge _ Or oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendUpEdge Then Trace.WriteLine("CURVE NOW") oPoint1 = oCurve.StartPoint oPoint2 = oCurve.EndPoint dBendLength = oPoint1.DistanceTo(oPoint2) MessageBox.Show(" dBendLength: " & dBendLength, "Title") oEvaluator2D = oCurve.Evaluator2D Trace.WriteLine("CURVE NOW1") oEvaluator2D.GetEndPoints(dmin, dmax) Trace.WriteLine("CURVE NOW2") Call oEvaluator2D.GetLengthAtParam(dmin, dmax, Length) MessageBox.Show(" Length: " & Length, "Title") Trace.WriteLine("CURVE NOW3") Trace.WriteLine("Adding bendnote to bendline") If Length > 1 ' Every bendline longer than 1mm oBendNote = oSheet.DrawingNotes.BendNotes.Add(oCurve) End If End If Next 'oCurve Next 'oView
If you have any other idea on how to ignore the small bendline please share.
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
___________________________