Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Mariusz Popiolek on November 24, 2010, 01:48:36 am

Title: accesing method parameter multiplicity
Post by: Mariusz Popiolek on November 24, 2010, 01:48:36 am
Hello

I would like to read method parameter multiplicity. Parameter class doesn't contain such attribute, StyleEx is empty. Is there a way to retrieve this information from model?
Thanks in advance for any help.

Best regards,
Mariusz Popiolek
Title: Re: accesing method parameter multiplicity
Post by: Geert Bellekens on November 24, 2010, 05:03:08 pm
Mariusz,

The multiplicity information is stored in the t_xref table.
The description column from my example has following info:
Code: [Select]
@PROP=@NAME=lower@ENDNAME;@TYPE=Integer@ENDTYPE;@VALU=1@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;@PROP=@NAME=upper@ENDNAME;@TYPE=UnlimitedNatural@ENDTYPE;@VALU=*@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;
I think the only solution right now (before sparx exposes this property in the API, you better send them a feature request) is to use Repository.SQLQuery and then parse the description column to get the info you need.

Geert
Title: Re: accesing method parameter multiplicity
Post by: Mariusz Popiolek on November 25, 2010, 02:09:13 am
Thanks for the help. I have sent change request :)

Best regards,
Mariusz
Title: Re: accesing method parameter multiplicity
Post by: Mariusz Popiolek on December 22, 2010, 01:23:23 am
How can I find t_xref row for my method parameter? 'where (t_xref.XrefID = parameterGUID)' returns empty set.

Best regards,
Mariusz Popiolek