Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: RAlexander on March 18, 2014, 07:47:12 am
-
I'm doing a bit of custom code generation and I am trying to figure out how to get the value of the Target Scope (entered on the Target Role item of the Association Properties dialog) within a VBScript. I cannot seem to locate the name of the object property for this. Does one exist?
Thanks!
-
Try Connector.ClientEnd and SupplierEnd. They hold ConnectorEnd objects each.
q.
-
Yes, but the target/source scope attributes do not seem to be in Connector.ClientEnd/SupplierEnd. They are, however,in the properties available to shape scripts (pp 73/74 of the documentation for the EA Software Developer's Kit) and also for as template substitution macros (p. 98) . But as far as I can tell, they are not in the properties for the EAConnectorEnd objects made available to VBScript (at least under the names used in SDK documentation).
-
Try ConnectorEnd.Visibility
-
ConnectorEnd.Visibility gives the access level (i.e., public, protected, private, or package), but not the target scope (which is either instance or classifier).
-
Try
Repository.SQLQuery("SELECT SourceTS, DestTS FROM t_connector WHERE Connector_ID = <id>"
That will return the values you are looking for. I guess the API does not provide them otherwise?!
q.
-
Thanks! I'll give that a try.
-
Thank works! Thanks very much.
Any suggestion as to parse the XML result in VBScript??
-
There was a recent post about parsing XML in VBScript posted by Nazim. Use the Search button top left and extend the time to one year.
q.