Book a Demo

Author Topic: Access EA from Outside - from Excel  (Read 8403 times)

Viking

  • EA User
  • **
  • Posts: 478
  • Karma: +2/-2
    • View Profile
Access EA from Outside - from Excel
« on: August 21, 2017, 11:20:35 pm »
Hello, I will get crazy (maybe it is already to late). Because I did not get the Eclipse / Java example to run, I tried Geert's Excel example. But the script says always that I may have forgotten to start EA or something else is wrong.

What I did is:
- "Install" Enterprise Architect Object Model or EA.tlb respectively via Excel References.
- "Install" Microsoft Word Object Library
- run "ea.exe /register".
- start EA.

Does anybody know if it is necessary to install EA.tlb via regtlibv12.exe?

Any other suggestions? Are any admin-rights required (e.g. to \Windows\System32)?

Is the reason that I use "GetObject(, "EA.App")? What if I start two EA's? Which one will be accessed?

Many thanks in advance, V.
« Last Edit: August 22, 2017, 02:51:54 am by Viking »

Viking

  • EA User
  • **
  • Posts: 478
  • Karma: +2/-2
    • View Profile
Re: Access EA from Outside - from Excel
« Reply #1 on: August 23, 2017, 11:58:14 pm »
Nobody has an idea?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Access EA from Outside - from Excel
« Reply #2 on: August 24, 2017, 09:56:04 am »
We have noticed that in order to get VBA (Including Excel) access to the EA instance, the EA instance needs to have been started with Admin OFF!  That's right! If EA is started with Administrator privilege, VBA will not find it and explicitly, the GetObject(, "EA.App") WILL fail!

When we start Excel to get to EA if the GetObject(, "EA.App") fails, we display a dialog saying "make sure you haven't started EA as Admin".

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Access EA from Outside - from Excel
« Reply #3 on: August 24, 2017, 12:48:44 pm »
We have noticed that in order to get VBA (Including Excel) access to the EA instance, the EA instance needs to have been started with Admin OFF!  That's right! If EA is started with Administrator privilege, VBA will not find it and explicitly, the GetObject(, "EA.App") WILL fail!

Well obviously any O/S shouldn't make things running in separate user (or even system) contexts visible to each other.  The types of things that want to hijack applications in another user context are generally malware.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Access EA from Outside - from Excel
« Reply #4 on: August 24, 2017, 04:42:35 pm »
Well obviously any O/S shouldn't make things running in separate user (or even system) contexts visible to each other.  The types of things that want to hijack applications in another user context are generally malware.
Ah yes, "Run as Administrator", literally means run as THE user Administrator not run as A user (who is an) administrator.  I'd forgotten (and me being such a literalist)!   :-[

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Viking

  • EA User
  • **
  • Posts: 478
  • Karma: +2/-2
    • View Profile
Re: Access EA from Outside - from Excel
« Reply #5 on: August 24, 2017, 09:24:00 pm »
I am not able to start EA as administrator. So this cannot be the reason.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Access EA from Outside - from Excel
« Reply #6 on: August 28, 2017, 07:22:07 am »
Well obviously any O/S shouldn't make things running in separate user (or even system) contexts visible to each other.  The types of things that want to hijack applications in another user context are generally malware.
Ah yes, "Run as Administrator", literally means run as THE user Administrator not run as A user (who is an) administrator.  I'd forgotten (and me being such a literalist)!   :-[

Yes it's basically su not sudo.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Access EA from Outside - from Excel
« Reply #7 on: September 06, 2017, 08:41:47 pm »
- run "ea.exe /register".
I've never done that.
All I ever did was install EA normally, and then I could access the running instance of EA from Excel or Word, or any other VBA environment.

It is a fact however that you cannot mix Admin and regular processes. Either you run everything with your normal user, or you run everything with the admin user.

If it still doesn't work I would suggest to contact sparx support. Maybe they have an idea why it isn't working on your side.

Geert