Book a Demo

Author Topic: How can we create new EA instance for anyother version of EA.  (Read 5346 times)

Tafros

  • EA User
  • **
  • Posts: 25
  • Karma: +1/-0
    • View Profile
How can we create new EA instance for anyother version of EA.
« on: September 11, 2018, 10:00:59 pm »
While creating EA instance like
EA.Repository rep = new EA.Repository().
By default it creates EA instance from primary Installed Path.How can we span instance from any other version of EA,which is also installed on the same machine.
For Eg. I am having EA12 and EA14(active version) and i need to create new EA instance from EA12.
How can i achieve this?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How can we create new EA instance for anyother version of EA.
« Reply #1 on: September 11, 2018, 11:41:13 pm »
Which language? Usually there's a method to tell the system to open an EXE via a specific path.

q.

Tafros

  • EA User
  • **
  • Posts: 25
  • Karma: +1/-0
    • View Profile
Re: How can we create new EA instance for anyother version of EA.
« Reply #2 on: September 12, 2018, 03:02:37 pm »
trying to create new EA instances from visual studio using c# language.
would you please tell me,how to create EA instance via a specific path of EA

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How can we create new EA instance for anyother version of EA.
« Reply #3 on: September 12, 2018, 04:09:35 pm »
trying to create new EA instances from visual studio using c# language.
would you please tell me,how to create EA instance via a specific path of EA
Hi Tafros,

You might want to google something like "c# start an exe".
I'm pretty sure the answer is already out there.

Geert

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: How can we create new EA instance for anyother version of EA.
« Reply #4 on: September 13, 2018, 04:19:21 am »
Not entirely clear what you are wanting to do.
If you want to launch a specific instance of the EA application programatically you can use  the microsoft ProcessStartInfo Class. For example, in VB.net the following will launch the .exe you specify.


Dim p As New Process
p.StartInfo.FileName = "C:\Program Files (x86)\Sparx Systems\EA\ea.exe" ' filename of specific EA .exe so could point to a different directory which has a different version
p.StartInfo.Arguments = "C:\Users\EXploringEA\Downloads\123.eap" 'e.g. filename of eap
Dim hasItStarted = p.Start()

This will launch the required version of EA and assuming its completely OK for different versions to coexist this should be fine.  I did a quick test and all seemed to work OK, but best ask sparx to confirm multiple versions are OK and there is no potential crossover.

Hope this helps.
« Last Edit: September 14, 2018, 06:04:12 am by EXploringEA »
EXploringEA - information, utilities and addins