Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Ribeye on September 12, 2024, 01:22:00 am

Title: EA_OnPostNewConnector, find the Attribute end, if the Connection is to Attribute
Post by: Ribeye on September 12, 2024, 01:22:00 am
My C# plugin is using EA_OnPostNewConnector to trap when the user creates a new connection, obviously.

One of the nice features of EA is that it allows the user to create a connection from an Attribute of a Class, not just a Class. You select the Attribute and drag from the { that pops up to the target Class.

From within EA_OnPostNewConnector I get the Connection that has been created by the user from the EA.EventProperties eventProperties parameter of EA_OnPostNewConnector.

     repository.GetConnectorByID(eventProperty.value) does the trick.

To test if the Connection is from an Attribute, I am expecting newConnector.StyleEx to have the Attribute details.

But I am seeing ""

I am seeing only one EventProperty in EventProperties, so the Attribute details are not there.

Question: within EA_OnPostNewConnector, how do I find the Attribute end, if the Connection has an Attribute end, not a Class end?

Title: Re: EA_OnPostNewConnector, find the Attribute end, if the Connection is to Attribute
Post by: Eve on September 23, 2024, 08:49:05 am
I don't think you can. I suspect that information isn't determined until after the broadcast.