Search code examples
enterprise-architect

EA Connector Creation


I am creating a Aggregation connector though Add-In. I am able to create the connector without Strong target end point by using the below mentioned code.

EA.Connector connector = signalEle.Connectors.AddNew("", "Aggregation");
                    connector.SupplierID = parentElement.ElementID;
                    connector.Subtype = "Strong";

                    connector.StyleEx = "LFEP=" + strEleName.AttributeGUID + "L;";
                    connector.ClientEnd.Role = strEleName.Name;
                    connector.Update();

enter image description here

How to create the connector with Strong target end ?


Solution

  • EA strikes again. Instead of setting subType to "Strong" you need to do this:

    ce = connector.clientEnd;
    ce.Aggregation = 2;
    ce.Update();
    

    Or if vice versa use supplierEnd instead. The subType seems to be ignored in this case.