Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: bkone on July 06, 2020, 06:51:34 pm
-
Hello all,
I tried to find some information in the forum on the mentioned topic, but I wasn't successfull.
If this topic was discussed before, just point me to the messages/threads.
I will create in the next future extensive scripts to handle ArchiMate modelling. Unfortunately EA support modelling, but falls short on analysis features. Hence, I have to create them ...
I played a bit with EA-Matic as I like the scripts approach more that going full in on DLL development.
Currently I have the following questions marks above my head:
- Why is EA-Matic complaining (not seeing the scripts) if I start using typed variables instead of just object?
For example: dim element as EA.Element
This would be helpful to use the suggestions in the editor.
- Only one script to handle the menu?
I tried to have multiple scripts contributing to the menu, but only the last script wins (has it's menu displayed).
So it seems as if I can only use one scripts to handle the menu for all scripts with functionality (and call them from the menu-script).
Is this correct?
Best regards
Boris
-
- Why is EA-Matic complaining (not seeing the scripts) if I start using typed variables instead of just object?
For example: dim element as EA.Element
This would be helpful to use the suggestions in the editor.
As I understand it, because that's not actually part of the language and EA-Matic is passing the scripts directly through to the windows interpreter.
-
That seem's to be the case.
I will go without typed variables.
Another issue seems to be using includes with EA-Matic.
Any sub/function from an included script doesn't seem to be available as I get errors like "... Variable is not defined: <function name> ...".
In scripts without EA-Matic it works.
-
You have to include "EA-Matic" in the included scripts as well. Otherwise EA-Matic doesn't see those.
for the other issues
- Yes you cannot use "as xxx" as this is not valid VBScript syntax. EA uses that for the autocomplete, but probably strips those before actually processing the scripts as well.
- Yes, there is only one menu function you can use, that is how the EA add-in systems works. An add-in (EA-Matic in this case) only gets one menu.
Geert