Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Maverick351 on February 29, 2024, 10:45:56 pm

Title: How to get name of Connector client element in VB Script
Post by: Maverick351 on February 29, 2024, 10:45:56 pm
Hello all,
This is very naive question but I am struggling to get the name of connectors target in VBscript
I saw in some help that we can get it by
Currentconnector.targer or currenctconnector.End_object_ID but any of these not working.

I can get the ClientID (unique ID) but I am looking to get the name of target element.

Thanks
Title: Re: How to get name of Connector client element in VB Script
Post by: qwerty on March 01, 2024, 08:27:20 pm
You need to retrieve it from the elements by the object-id

q.
Title: Re: How to get name of Connector client element in VB Script
Post by: tweber on March 02, 2024, 03:47:28 am
Not sure about VB, but in jscript, here's the code:
var conn as EA.Connector;
var client as EA.Element;
// for the connector,

conn  = // the connector you're interested in.

client = Repository.GetElementByID(conn.ClientID);
var cName = client.Name;

Title: Re: How to get name of Connector client element in VB Script
Post by: qwerty on March 02, 2024, 11:19:48 am
The syntax is different, but those are the operations to use...

q.