Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Steve Wartik on February 28, 2012, 08:47:23 am
-
Hi,
I've written some JScript code. I'd like the user to be able execute it through a menu. Specifically, I'd like to add a menu hierarchy to Extensions. Just like the ODM-related menu items, a script would be executed each time the user selects an item. Can someone tell me how to do this? Thanks.
-
I would make an add-in.
See Tutorial: Create your first C# Enterprise Architect addin in 10 minutes (http://geertbellekens.wordpress.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/)
Geert
-
Geert,
An add-in is certainly a possibility, but I was hoping to package and distribute the capability I've developed using MDG. In other words, I'd like a user to select the Tools>MDG Technology Import item, load the file I'm distributing, then see my menus. I would prefer that the user not have to install an add-in too. Is that feasible?
Thanks,
Steve
-
I don't know.
I've never used MDG before.
Geert
-
Unfortunately, you can't add scripts from your technology into that menu. ODM has been explicitly added by Sparx.
-
Simon,
Thanks for the definitive response. Obviously not what I wanted to hear. Can I write an add-in that invokes JScript?
Thanks,
Steve
-
for which reason?
you can create an addin which does exactly the stuff you need.
no need for jscript.
-
Well, the immediate reasons are: 1) I already have the JScript working; 2) I've never programmed in C#, I dislike Visual Basic, etc. In other words, I'm guessing that making use of my existing scripts would be quickest.
-
If you programmed in java you wont have any problems using C#
(i for myself started to develop an EA Addin withouth any C# experiences and it never was a problem)
If the jscripts dont do what they should i dont see any other possibilities than start a C# addin.
Its worth a try.
-
Stao,
Okay, I'll give it a try. I hope you're right about Jave -> C#. Wish me luck!