Hi Anton,
This code re-shows hidden lines of the occurrence which contains the selected line.
At first you should select a line and then execute Test().
Public Sub Test()
Dim oDrawingDoc As DrawingDocument: Set oDrawingDoc = ThisApplication.ActiveDocument
Dim oSelectedCurve As DrawingCurve
Set oSelectedCurve = oDrawingDoc.SelectSet(1).Parent
Dim oOcc As ComponentOccurrence
Set oOcc = oSelectedCurve.ModelGeometry.Parent.Parent
Debug.Print oOcc.Name
Dim oView As DrawingView
Set oView = oSelectedCurve.Parent
ReShowHiddenLines oView, oOcc
End Sub
Private Sub ReShowHiddenLines(oView As DrawingView, oOcc As ComponentOccurrence)
Dim oDrawingCurves As DrawingCurvesEnumerator
Set oDrawingCurves = oView.DrawingCurves(oOcc)
Dim oDrawingCurve As DrawingCurve
For Each oDrawingCurve In oDrawingCurves
Dim oDrawingCurveSegment As DrawingCurveSegment
For Each oDrawingCurveSegment In oDrawingCurve.Segments
'Debug.Print oDrawingCurveSegment.Visible
If oDrawingCurveSegment.Visible = False Then oDrawingCurveSegment.Visible = True
Next oDrawingCurveSegment
Next oDrawingCurve
End Sub
You can re-show the occurrence lines by your code with using ReShowHiddenLines().
=====
Freeradical
Hideo Yamada