The connector is not hidden universally, but in a specific diagram. Thus, the visibility is not a property of the Connector
class, but of the DiagramLinks
class, which holds the representation of one connector in one diagram. (Yes, the class is called DiagramLinks with an 'S'.) In DiagramLinks
you'll find the property IsHidden
.
So what you need to do is:
- Retrieve the
Connector
you want to hide/show, and the Diagram
you want to show/hide it in.
- Traverse the
Diagram.DiagramLinks
collection, whose constituent type is the DiagramLinks
class.
- Find the
DiagramLinks
instance where Connector.ConnectorID
matches DiagramLinks.ConnectorID
.
- Set
DiagramLinks.IsHidden
to True
(or false
to unhide).
- Call
DiagramLinks.Update()
. You may also need to call Diagram.Update()
.