Book a Demo

Author Topic: Automation issues under v12 and Office 2013  (Read 6187 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Automation issues under v12 and Office 2013
« on: August 06, 2015, 03:51:28 pm »
Today, I noticed that code (in one of my VBA libraries) that has worked for years - prior to both v12 and Office 2013 has failed.

I have two issues so far (both to do with EA.Collections):
1) Adding an element to a package using EA.Package.Elements.AddNew causes a VBA internal error which is manifest as an EA error on the (opened) diagram.
2) EA.Diagram.DiagramObjects.AddNew reports it has created the object on the diagram, I can retrieve it and (apparently) manipulate it in the code (checked via breakpoints and watches) but the objects is never added to the diagram.

Anybody else seen any anomalous behaviour with automation under v12 and Office 2013?

I was developing some new automation when I had the first problem.  Since I was hijacking some similar previously functioning code for problem 2, I set up a test to confirm the original code was still working.  It's not.

When I get home tonight, I'll try under other configurations.
Bug report submitted.

TIA,|
Paolo
« Last Edit: August 06, 2015, 03:53:56 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Automation issues under v12 and Office 2013
« Reply #1 on: August 06, 2015, 03:57:21 pm »
No, can't say i have.
And I use plenty of adding elements to diagrams and packages.

But then again I'm mostly using internal scripting with VBScript, and a lot less automation from MS Office.
The little bits I did in Office where in an older version of Office.

So there's a chance it's related to MS Office, of even the specific version of Office you are using.

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Automation issues under v12 and Office 2013
« Reply #2 on: August 06, 2015, 04:26:23 pm »
The only incompatibility from older versions that I am aware of is GetByName for TaggedValues. It took a long time to find the cause of the problem, and the plan is to put it back in our next build.

My main concern would be if it's reproduceable in something other than a particular version of VBA.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Automation issues under v12 and Office 2013
« Reply #3 on: August 06, 2015, 04:34:49 pm »
Quote
No, can't say i have.
And I use plenty of adding elements to diagrams and packages.

But then again I'm mostly using internal scripting with VBScript, and a lot less automation from MS Office.
The little bits I did in Office where in an older version of Office.

So there's a chance it's related to MS Office, of even the specific version of Office you are using.

Geert
Yes,  My Diagrammer add-in in C# doesn't have this problem with v12, so that's why I'm suspecting Office 2013.


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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Automation issues under v12 and Office 2013
« Reply #4 on: August 06, 2015, 04:40:36 pm »
Quote
The only incompatibility from older versions that I am aware of is GetByName for TaggedValues. It took a long time to find the cause of the problem, and the plan is to put it back in our next build.

My main concern would be if it's reproducible in something other than a particular version of VBA.
I normally set the VBA reference to look at C:\Program Files (x86)\Sparx Systems\EA\EA.TLB for the (latest) Enterprise Architect Object Model 2.10
However, I also have v9.1 (build 909) installed on some of my machines.  If I point that reference to: C:\Program Files (x86)\Sparx Systems\EA_909\EA.TLB  I should get the v9.1 TLB right?  That should allow me to cross check V9 vs Office 2013 and v12 and Office 2013 yes?  Similarly for other versions of Office and v12.

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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Automation issues under v12 and Office 2013
« Reply #5 on: August 06, 2015, 04:43:55 pm »
Quote
Today, I noticed that code (in one of my VBA libraries) that has worked for years - prior to both v12 and Office 2013 has failed.

I have two issues so far (both to do with EA.Collections):
1) Adding an element to a package using EA.Package.Elements.AddNew causes a VBA internal error which is manifest as an EA error on the (opened) diagram.
[size=14][SNIP][/size]
I forgot to mention, this problem ONLY occurs with Access 2000 .EAP Repositories.  It doesn't occur with Access 97 .EAP Repositories nor with SQL Server Repositories.

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Automation issues under v12 and Office 2013
« Reply #6 on: August 07, 2015, 09:09:38 am »
Quote
I forgot to mention, this problem ONLY occurs with Access 2000 .EAP Repositories.  It doesn't occur with Access 97 .EAP Repositories nor with SQL Server Repositories.
That is interesting. Suggests to me that Office 2013 is causing a different dll for JET to be loaded or making some other change to the runtime that means it doesn't behave as expected.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Automation issues under v12 and Office 2013
« Reply #7 on: August 07, 2015, 09:37:43 am »
Further testing overnight on machines with Office 2010 has n't substantially changed things.

One of the problems is since V12 is installed as \EA the TLB to be picked up is the v12 one.  I treid to change to one of the other versions, but the references browse dialog wouldn't allow me to, it kept pointing to the v12 TLB.

However, I did get differences in behaviour if I had a v12 image active or a v9.1 (909) image active.  No substantive differences, but definitely different behaviour.  I've run this type of automation against different images in this way for yeears - this is the first time I'm seeing this type of anomalous behaviour.

Simon, your post: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1438852207/3#3

Got me thinking... When I get into work, I'll see if running EA as Administrator changes things.

Paolo
« Last Edit: August 07, 2015, 09:46:34 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!