Creating an EA Connector

I am creating an Aggregation connector, although an add-in. I can create a connector without a strong target endpoint using the code below.

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 a connector with a strong target end?

+4
source share
1 answer

EA hits again. Instead of setting subTypeto Strong, you need to do this:

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

Or, conversely, use instead supplierEnd. In this case, the character subTypeseems ignored.

+3
source

Source: https://habr.com/ru/post/1674184/


All Articles