Author Topic: Api to set "Allow Duplicates" checkbox  (Read 4419 times)

kotrick

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Api to set "Allow Duplicates" checkbox
« 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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Api to set "Allow Duplicates" checkbox
« Reply #1 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.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13233
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Api to set "Allow Duplicates" checkbox
« Reply #2 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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Api to set "Allow Duplicates" checkbox
« Reply #3 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.

kotrick

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Api to set "Allow Duplicates" checkbox
« Reply #4 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.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Api to set "Allow Duplicates" checkbox
« Reply #5 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.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13233
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Api to set "Allow Duplicates" checkbox
« Reply #6 on: September 05, 2014, 04:35:03 pm »
Hmm, another gem from the deep dark bowels of EA ::)

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Api to set "Allow Duplicates" checkbox
« Reply #7 on: September 05, 2014, 05:21:24 pm »
Well, a gem is something precious. This is more like something from Pandora's box.

q.