Author Topic: Auto Group Elements (hold ALT to toggle) - programmatically disable  (Read 1629 times)

didier.pironet

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Hi guys,

We have many architects working with Sparx EA 16.x as a published application on Citrix.
On several occasions we had troubles with elements moving around and nesting with other parents creating a mess in our structures.
Most of the time it was related to "Auto Group Elements (hold ALT to toggle)" that toggled ON for no apparent reason!

Questions are:
  • Can we programmatically check that this parameter is toggled OFF every time Sparx EA starts?
  • Is there a way to centrally managed those parameters for all users?

Thx a lot for your advices and hints.



qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Currently offline, so out of my guts: look into the registry for EA. Export, alter the setting and compare the re-export. If you found it there you have your answer (synch the registry somehow). If not, leave a note here and I will have a look later.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13239
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
the option is stored in the registry:

Code: [Select]
[HKEY_CURRENT_USER\Software\Sparx Systems\EA64\EA\OPTIONS]
"DGM_AUTOGROUP"=dword:00000001

The problem is that this is a use setting. You can use a script of some kind to update the registry, but the problem is that EA reads that value when starting up.
So if it's a script in EA, you'll have to restart before it takes effect.

What we did in a few cases is run an EA-Matic script at startup that checks and corrects some of these mandatory user settings.
When the script notices an error, it corrects the setting and informs the user he will need to restart EA. EA is then forcibly closed (because we don't trus the user to actually close EA when we ask nicely)

Here's an example of such a script:

https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Projects/EA-Matic%20Scripts/Fix%20Mandatory%20User%20Settings.vbs

Geert


didier.pironet

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Thanks Qwerty and Geert.
Registry obviously  :D
We will try Geert's EA-Matic script and add additional 'global' user settings we would like to see checked and verified.

Quote
because we don't trus the user to actually close EA when we ask nicely
so true  ;D