Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: kotrick on September 04, 2014, 08:13:03 pm

Title: Api to set "Allow Duplicates" checkbox
Post by: kotrick on September 04, 2014, 08:13:03 pm
Hello,
I need to set  "Allow Duplicates" and "Multiplicity is ordered" checkBox for port using EA api.Can anyone help
Title: Re: Api to set "Allow Duplicates" checkbox
Post by: qwerty on September 04, 2014, 10:51:32 pm
This is stored somewhere in the registry (AFAIR). Compare the export of HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS before and after changing the options.

q.
Title: Re: Api to set "Allow Duplicates" checkbox
Post by: Geert Bellekens on September 04, 2014, 11:27:40 pm
No, its no the setting for tagged values he is after.
These are setting that are a part of the "Multiplicity" in connector ends and attributes.

They are probably stored in a "style" field or similar.

Geert
Title: Re: Api to set "Allow Duplicates" checkbox
Post by: qwerty on September 05, 2014, 05:00:21 am
Oh, you're right. It's in t_connector.SourceStyle as an attribute and in the column t_attribute. AllowDuplicates.

q.
Title: Re: Api to set "Allow Duplicates" checkbox
Post by: kotrick on September 05, 2014, 01:45:37 pm
Thank You for reply.

I am interested in setting "Allow Duplicates" checkBox of a FlowPort or Port using api.

Title: Re: Api to set "Allow Duplicates" checkbox
Post by: qwerty on September 05, 2014, 03:44:47 pm
OMG

It's stored in t_xref >:(

Look out for Description like @PROP=@NAME=isUnique@ENDNAME;@TYPE=Boolean@ENDTYPE;@VALU=1@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP; where @VALU=1@ENDVALU; means AllowDuplicates is on and =0 that it's off.

Aaaaarggggghhhhh

VALU what language ist that? Ah! Of course Sparxian. I forgot they come from another planet. So t_xref is now obvious.

Please excuse me for a moment. I have to go out of the door and cry.

q.
Title: Re: Api to set "Allow Duplicates" checkbox
Post by: Geert Bellekens on September 05, 2014, 04:35:03 pm
Hmm, another gem from the deep dark bowels of EA ::)

Geert
Title: Re: Api to set "Allow Duplicates" checkbox
Post by: qwerty on September 05, 2014, 05:21:24 pm
Well, a gem is something precious. This is more like something from Pandora's box.

q.