Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Tehila1 on August 19, 2014, 11:51:18 pm

Title: EA ignores registry values
Post by: Tehila1 on August 19, 2014, 11:51:18 pm
Hello,

Is there an addition location where the EA registry values are saved?
When I change registry entries, there is no effect on EA.
The registry I modified is EA400/OPTIONS -> VC_TIMEOUT.

Any ideas?
Title: Re: EA ignores registry values
Post by: qwerty on August 20, 2014, 12:55:02 am
There's a possibility that you looked in the wrong branch. Nowadays EA allows for storing values in HKEY User and Local Machine.

No idea which takes over precedence.

q.
Title: Re: EA ignores registry values
Post by: Eve on August 20, 2014, 08:51:54 am
EA will only read the key when it first uses it. After that it will cache the result. You're not trying to change it while EA is running are you?
Title: Re: EA ignores registry values
Post by: Tehila1 on August 21, 2014, 04:14:40 pm
Quote
EA will only read the key when it first uses it. After that it will cache the result. You're not trying to change it while EA is running are you?

I change it via an addin, so EA is running at the change time.
What do you mean in 'you have to use the key'? close and re-open EA or another meaning?
Title: Re: EA ignores registry values
Post by: Eve on August 21, 2014, 05:02:31 pm
Quote
I change it via an addin, so EA is running at the change time.
Then that's your problem. It will not work.
Title: Re: EA ignores registry values
Post by: Tehila1 on August 21, 2014, 06:27:51 pm
I tried to change the registry entry via a  stand-alone application, EA is not running. The result was the same - no influence on EA.

Any ideas?

Code: [Select]
RegistryKey currentUserRegistryKey = Registry.CurrentUser;
const string optionsSubkey = @"Software\Sparx Systems\EA400\EA\OPTIONS";
RegistryKey optionsRegistryKey = currentUserRegistryKey.OpenSubKey(optionsSubkey);
//Modify the relevant registry values. If the values were not found
//the program creates them with the right content.                        
Registry.SetValue(optionsRegistryKey.Name, "VC_TIMEOUT", "40");



Title: Re: EA ignores registry values
Post by: qwerty on August 21, 2014, 11:32:44 pm
Have you verified that the key was actually changed? I mean, did you look into the registry after running your program. Windoze often silently ignores those things and leaves you (like EA) in the believe that all is well.

q.
Title: Re: EA ignores registry values
Post by: Tehila1 on August 24, 2014, 06:48:16 pm
Quote
Have you verified that the key was actually changed? I mean, did you look into the registry after running your program. Windoze often silently ignores those things and leaves you (like EA) in the believe that all is well.

q.

Yes, I did.  The registry key was changed as expected, but does not affect EA.
How can I trigger EA to read the new value?
Title: Re: EA ignores registry values
Post by: qwerty on August 24, 2014, 08:12:38 pm
Could you tell me where in EA this value is set manually?

q.
Title: Re: EA ignores registry values
Post by: Tehila1 on August 24, 2014, 09:31:38 pm
Quote
Could you tell me where in EA this value is set manually?

q.

Of course: The appropriate location of VC_TIMEOUT registry key inside EA is:
Project -> Version Control -> Version Control Setting. At the bottom of the window there is a textbox named VC TIMEOUT Value.

Thanks in advance!
Title: Re: EA ignores registry values
Post by: qwerty on August 24, 2014, 10:20:51 pm
Ok. Found that. Now, how can I force the SVNserve to produce a time out? If I stop the server EA complains that there is no service at all. Is there a simple way to force it timing out? Would I need to setup some dummy service. And if so, on which port?

q.
Title: Re: EA ignores registry values
Post by: qwerty on August 24, 2014, 10:33:47 pm
I did setup a dummy server and actually it worked. Changing the value in the registry made EA wait for the appropriate number of seconds as specified in the registry.

q.
Title: Re: EA ignores registry values
Post by: Tehila1 on August 25, 2014, 08:44:33 pm
Quote
I did setup a dummy server and actually it worked. Changing the value in the registry made EA wait for the appropriate number of seconds as specified in the registry.

q.

When I try to add a configuration to the VC_CONFIGS registry key, EA is not affected, and still "Requires configuration".
Any ideas?
Title: Re: EA ignores registry values
Post by: qwerty on August 25, 2014, 11:13:44 pm
Oh. This is a different thing. I thought you were just after the timeout not working. I might look into that later again.

q.
Title: Re: EA ignores registry values
Post by: qwerty on August 25, 2014, 11:35:17 pm
You need to add a row to t_genopt:
AppliesTo=VCConfigs
Option=<VCConfigs><Config><Guid>test</Guid><Type>2</Type></Config></VCConfigs>

Of course you need to supply something else than test and if it's not SVN the "2" must also be changed.

q.
Title: Re: EA ignores registry values
Post by: Tehila1 on August 27, 2014, 07:58:08 pm
Quote
You need to add a row to t_genopt:
AppliesTo=VCConfigs
Option=<VCConfigs><Config><Guid>test</Guid><Type>2</Type></Config></VCConfigs>

Of course you need to supply something else than test and if it's not SVN the "2" must also be changed.

q.

Thanks for the testing!
I tried the above, the configuration is added to the list of configuration, but "Requires Configuration". This means that the local path is not defined. I define a local path via %appdata\EA\paths.txt% file, the new loca-path is added to the local-paths list in EA, but the configuration cannot recognize it.

The configuration you've done automatically was configured to a working copy or required configuration?
How can I make the configuration recognize the local path automatically?


Title: Re: EA ignores registry values
Post by: qwerty on August 27, 2014, 11:03:08 pm
In t_package you also need to connect the XML name:

xmlpath=<diskname>.xml
umlversion=Enterprise Architect XMI/UML 1.3
packageflags=VCCFG=test;
Note that packageFlags may contain values so you have to concatenate that with a semicolon.

q.