Community
Hi,
I'm writing a code that will hide the bendextents of non selected bendlines in flat pattern view in a drawing. I have found this snipplet, but here I have to select the bend extent lines instead of the bend line. Any suggestions?
Dim selectedCurve1 As DrawingCurveSegment = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Select first Bendextet line") Dim selectedCurve2 As DrawingCurveSegment = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Select second Bendextent line") Dim drawingview As DrawingView = selectedCurve1.Parent.Parent For Each curve As DrawingCurve In drawingview.DrawingCurves If (curve.EdgeType = DrawingEdgeTypeEnum.kBendExtentEdge) Then If ((curve.Equals(selectedCurve1.Parent) = False) And (curve.Equals(selectedCurve2.Parent) = False)) Then For Each segment As DrawingCurveSegment In curve.Segments segment.Visible = False Next End If End If Next
Hi Lars,
I've had the same issue and came across your post. I've found that the below works for ALL bend extents, so will require tweaking to exclude views that you have selected. Perhaps you can add the selected views to an array list ('Keep'), then direct the oView in line 7 to the inverted list.
Dim oDrawingDoc As DrawingDocument
oDrawingDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
For Each oSheet In oDrawingDoc.Sheets
Dim oView As DrawingView
For Each oView In oSheet.DrawingViews
'TURN BEND EXTENTS OFF
If oView.DisplayBendExtents = True Then oView.DisplayBendExtents = False
Next
Next
Can't find what you're looking for? Ask the community or share your knowledge.