javascriptautomationenterprise-architectsupplier

How to find a Notelink, in EA automation, that links a Note to a Connector (and note to an Element)


I have an Enterprise Architect diagram with a Note linked (link L2) to a Connector (link L1). Using Automation API :


Solution

  • I looked into that and it appears the linked element has a value in t.object.PDATA4 (which equals EAElement.MiscData(3)) being

    idref=<connId>;
    

    where <connId> is the connector ID which it's linked to. There are as many semicolon separated entries as there as links to connectors.

    Here's my setting:

    enter image description here

    two associations linked to a note. t_connector has two entries with IDs 1 and 2:

    enter image description here

    And now as you can see t_object looks like this:

    enter image description here

    The note (which is linked to the associations) has PDATA with references to the association IDs 1 and 2.

    While you can read MiscData through the API it is (IIRC) r/o. In those cases I just fall back to Repository.Execute to run any UPDATE queries.