Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Ribeye on March 30, 2022, 09:26:33 pm
-
I am writing C# plugins using Visual Studio.
On my plugins menu I would like to have a menu item that triggers the Develop -> Data Modeling -> Import function.
How do you trigger standard EA menu items from C#?
-
You can't I'm afraid.
You can only use the API. Some of these menu options have an equivalent in the API, but certainly not all of them.
Geert
-
Oh.
Can it be done in Javascript?
I cant find a way for that either.
-
Oh.
Can it be done in Javascript?
I cant find a way for that either.
No, not in any language really, unless you want to use some kind of simulated click tool such as used for testen applications.
Not the best idea as that is usually really unstable and not reliable.
Geert
-
I am thinking to assign key strokes to the menu functions using Start > View > Visual Style > Customize > Keyboard.
From C# you can send keystrokes, I see in the documentation.
Maybe that is an option.
Except I see not all menu options are available from "customise" form, so you cant assign a keyboard shortcut e.g. Develop->Data Modelling -> Import
-
Even if it was an option it would be a half-assed cobbled together unreliable solution.
Might be good enough if you are the only user, but not really suitable as a professional solution.
You can ask sparx support if they know a solution to automating the data modelling import.
There might be an undocumented CustomCommand you can call, or else they can enter a feature request on your behalf.
Geert
-
Thanks Geert - they confirmed it is not implemented.