Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Uffe on October 13, 2017, 01:12:04 am

Title: Get/Set operation parameter multiplicity through API
Post by: Uffe on October 13, 2017, 01:12:04 am
Hello boys and girls,

An operation parameter's multiplicity is stored in t_xref. The API Parameter class does not have a CustomProperties collection.
Is there a way to set a parameter's multiplicity through the API?

Cheers,


/Uffe
Title: Re: Get/Set operation parameter multiplicity through API
Post by: qwerty on October 13, 2017, 05:46:51 am
Nope. You need to use the back door.

q.
Title: Re: Get/Set operation parameter multiplicity through API
Post by: PAF on February 22, 2022, 07:07:44 pm
For newbies: is it possible to give the backdoor code?

I guess, we're talking about some select

Select t_xref.`Type`, client.Object_ID as ClientID, client.Name as ClientName, client.Object_Type as ClientType, supplier.Object_ID as SupplierID, supplier.Name as SupplierName, supplier.Object_Type as SupplierType from t_xref, t_object client, t_object supplier where t_xref.Client = client.ea_guid and t_xref.Supplier = supplier.ea_guid;

I have ParameterGUID, I need to know the multiplicity of it. Don't know how to run selects yet
Title: Re: Get/Set operation parameter multiplicity through API
Post by: qwerty on February 22, 2022, 07:42:36 pm
You run the sql simply via Repository.SQLQuery(sql) which returns a XML structure (see the help or so). Actually I have a wrapper in my Python code and deal with simply array of columns.

q.