Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: gervais.b on January 15, 2015, 01:44:01 am
-
Hello,
I have a java application who use the EA bridge to generate a single file from a lot of diagrams.
Into the generated file I would like to write if a method parameter is required or not. For that, I want to read the parameter multiplicity (if lower bound is >0, it is required).
But At this time, I'm unable to read this information and cannot see anything about that from the documentation.
Could you, please, help me to read the paramtere multiplicity ?
Thanks a lot.
EA version 9.2.920
-
You need to query t_xref :(
Create an empty EAP with one operation that has multiplicity. Now you find an entry in t_xref with name CustomProperties. The Description contains the (a bit cryptic) information you need. The Client is the guid of the operation paramter.
q.
-
Thanks a lot.
For a more complete response, the "t_xref" contains a "Description" column.
The content of this column is a plain text who contains a markup where each tag start with "@+tagname=" and end with "@END+tagname;".
Reformatted sample :
@PROP=
@NAME=lower@ENDNAME;
@TYPE=Integer@ENDTYPE;
@VALU=1@ENDVALU;
@PRMT=@ENDPRMT;
@ENDPROP;
@PROP=
@NAME=upper@ENDNAME;
@TYPE=UnlimitedNatural@ENDTYPE;
@VALU=1@ENDVALU;
@PRMT=@ENDPRMT;
@ENDPROP;
In my case it is the property with "@NAME=[highlight]lower[/highlight]@ENDNAME;" who hold the requested "@VALU=[highlight]1[/highlight]@ENDVALU;"
In case you didn't know that before (like me), the ".eap" file can be opened by "Ms Access".