Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: damien on June 02, 2008, 07:57:25 pm

Title: Hide connectors
Post by: damien on June 02, 2008, 07:57:25 pm
Hello,

I would hide connectors between two elements in all diagrams of a special type. Connectors have a metatype i have created. I success with this code :

Shared Sub HideConnector(ByVal Diagram As EA.Diagram, ByVal Connector As EA.Connector)

        Dim DiagramLink As EA.DiagramLink

        DiagramLink = Diagram.DiagramLinks.AddNew(Connector.ConnectorID, Connector.Type)
        DiagramLink.ConnectorID = Connector.ConnectorID
        DiagramLink.DiagramID = Diagram.DiagramID
        DiagramLink.IsHidden = True
        DiagramLink.Update()
        Diagram.DiagramLinks.Refresh()

    End Sub

But when i create an element with a quicklinker, the connector isn't hidden

Someone knows the difference between to create connectors with toolbox and to create connectors with quicklinkers ?

Thanks you
Bye
Title: Re: Hide connectors
Post by: damien on June 03, 2008, 01:38:56 am
Re

I apologize if i haven't explain very well my problem, I create a connector in a diagram A, i would know how can i hide this connector in all others diagram with an add-in. I try to define a diagramLink with isHidden = true, it works but when i create an element with quicklinkers, it doesn't work.

What is the good method to hide the connector to all diagrams except A ?

Thanks you
Bye