Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Paolo F Cantoni 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
-
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
-
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.
-
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
-
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
-
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
-
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.
-
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