Author Topic: accessing EA variables  (Read 5745 times)

xkrystof

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
accessing EA variables
« on: February 13, 2008, 05:12:34 am »
Hi,
EA has in Tools -> Options tab General, with PATHS to
* Project directory
* File Directory
* ...
etc

I am writing a plugin for EA as the WSC in Visual Basic and  need to read these "variables". Is this possible somehow? In Java, VB, ...


thanks

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: accessing EA variables
« Reply #1 on: February 13, 2008, 05:29:49 am »
You can read them from the registry:
HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS

xkrystof

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: accessing EA variables
« Reply #2 on: February 13, 2008, 06:08:03 am »
Thank for the hint, but
There is nothing as File Directory or Project direcotry.

I exported register into the txt file and I found only entries like
"DYNWEBSEARCH"="www.google.com"
or
"WEBHOME"="http://sparxsystems.com"

but nothing with connection to File Directory or Project direcotry


any other ideas?
???

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: accessing EA variables
« Reply #3 on: February 13, 2008, 08:36:32 am »
They are there, really...

I was going to send you an answer, but Frank beat me to it. The reason I was delayed was that I opened the registry to check.

Look at Install Path in the EA portion and PROJECTDIR in the OPTIONS portion of the tree.

You will have to figure out how to expand the various variables that can be used in these options.

David
No, you can't have it!

xkrystof

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: accessing EA variables
« Reply #4 on: February 14, 2008, 08:31:33 am »
Well, I checked it once again - you are right - there is info about "PROJECTDIR", but I am missing any entry connected with the "File Directory".

I have in my EA entry "File Directory" with value c:\aaa\bbb.
When I search string "c:\aaa\bbb" or even a part "a\bbb" in the exported register, nothing matches.

BTW: I found all of fields in "General" tab: "WEBMAIL", "PROJECTDIR", "DYNWEBSEARCH", "WEB HOME". But no FILEDIR or something like that...
:-/

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: accessing EA variables
« Reply #5 on: February 14, 2008, 11:59:01 pm »
This is pretty weird indeed. Some of these settings seem to be nowhere. Not in an eap file obviously, cause you can set them without a project. Not in the registry, not in the EA application folder, not in the Documents and Settings folder. I'm running out of ideas where they might be hiding them.

thomaskilian

  • Guest
Re: accessing EA variables
« Reply #6 on: February 15, 2008, 12:26:11 am »
I put a value in Project Directory and ran a search with regedit. It appeared in HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS

Are you administrator on your machine?

« Last Edit: February 15, 2008, 12:27:36 am by thomaskilian »

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: accessing EA variables
« Reply #7 on: February 15, 2008, 01:29:07 am »
PROJECTDIR is there, but "File Directory" isn't. Anyway EA doesn't seem to save it all. No matter what I write in the settings dialog, next time I open EA it comes back as $EAPDIR.

thomaskilian

  • Guest
Re: accessing EA variables
« Reply #8 on: February 15, 2008, 03:22:16 am »
Right you are.  So that might be the answer: it's hard coded.

Btw. Any idea what meaning this field has? I never used it...
« Last Edit: February 15, 2008, 03:24:17 am by thomaskilian »

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: accessing EA variables
« Reply #9 on: February 15, 2008, 03:33:23 am »
Quote
Any idea what meaning this field has? I never used it...


EA help says "Default location for files". But of course I've never used it either, since it has this mysterious $EAPDIR entry glued to it.

Krystof, what were you doing with "File Directory"?

xkrystof

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: accessing EA variables
« Reply #10 on: February 15, 2008, 05:30:26 am »
Well, I am storing documentation for use-cases in "Files" tab (click element, choose properties, choose Files) as external word documents. The path of each file is given by a relative path (eg. \usecases\aaa\bbb\example.doc)
The variable "File directory" expands into this path when I launche a document.


lubos

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: accessing EA variables
« Reply #11 on: April 01, 2008, 12:24:36 am »
it is stored in table  usys_system in EAP.
I have problem that it is the property of the project, not of an user.