Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Bruce Taylor on April 27, 2013, 01:37:46 am
-
Using the Java API contained in eaapi.jar, it is possible to get and set the Alias field of Packages, Elements, and Connectors, but not for Attributes. It looks like this was an oversight, because Attributes can clearly contain an Alias, and the aliases can be imported/exported using XMI.
Has anyone found a newer version of eaapi.jar with this issue fixed, or found a workaround for the problem?
Many thanks
-
I'm using EA 10 which includes a eaapi.jar that dates from 12 april 2010...
-As a workaround- you could write an SQL update statment, directly on the database table, after creating the attribute and updating that to the database.
You can use the EA model search view to create and test your update statement (it provides code completion), then run the SQL statement using the java API Repository.Execute.
best regards,
Paulus
-
.... Bruce according to the EA Spec for Attribute class the ALIAS is stored in the field STYLE... ::)
There is a Attrbiute.SetStyle() available in eaapi.jar... so you should be able to set tye alias using Attrbiute.SetStyle() ;)
-
.... Bruce according to the EA Spec for Attribute class the ALIAS is stored in the field STYLE... ::)
Ah, so it is - thanks for seeing that. Not at all intuitive, but I've been involved in hacks just as bad in my day...