Book a Demo

Author Topic: Running Script?  (Read 5256 times)

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Running Script?
« on: November 17, 2009, 05:31:26 pm »
Hi,

I have created a script, JavaScript, that I want to run easily. How do I do that? I want something similiar to adding new tools in the tools menu by using customize.

Thanks,
Magnus

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Running Script?
« Reply #1 on: November 17, 2009, 05:44:09 pm »
In that case you'll have to create an addin. That allows you to define menu items in the main menu and context menu's.

Look http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/creatingaddins.html for more information.

Geert

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Running Script?
« Reply #2 on: November 17, 2009, 06:13:14 pm »
Thanks,

Strange that Sparx has not added a easier way of running scripts. We have 100+ clients and I'm not very happy to deploy an add-on to all clients and get it up to date. The scripts itself requires no deployment effort.

// Magnus

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Running Script?
« Reply #3 on: November 17, 2009, 06:27:17 pm »
Magnus,

It it is any help, we deploy our EA addins using SMS, you might want to consider that to ease the pain.

Geert

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Running Script?
« Reply #4 on: November 17, 2009, 07:31:08 pm »
Quote
Thanks,

Strange that Sparx has not added a easier way of running scripts. We have 100+ clients and I'm not very happy to deploy an add-on to all clients and get it up to date. The scripts itself requires no deployment effort.

// Magnus

You can include scripts in a MDG technology file with your UML profile and put them on a network share or web server.
If all running instances of EA in your company point to that directory/web server you will not have to worry about deployments and updates any longer as the users will always benefit from updates as soon as they start up EA.

Oliver

Shawn Stepper

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Running Script?
« Reply #5 on: November 18, 2009, 05:04:52 am »
But once it's deployed, how does an end user easily run the script? That is the problem...

MagnusH

  • EA User
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Running Script?
« Reply #6 on: November 18, 2009, 05:22:37 pm »
Exactly,

How are you supposed to start the script without an add-in? Open the script window and press start? Not very high user experience from my perspective.

// Magnus

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Running Script?
« Reply #7 on: November 18, 2009, 08:14:44 pm »
Quote
Exactly,

How are you supposed to start the script without an add-in? Open the script window and press start? Not very high user experience from my perspective.

// Magnus

I did not say it is sophisticated from a user experience level- I just pointed out the deployment option.
Though I believe that people who are mature enough to work with a UML modelling tool can open the script window, find the script and press the start button.

We do it here exactly the same way. What does not work well is user feedback in case of errors. Though this is not a EA problem but of the limited capabilities of the scripting itself.

Oliver
« Last Edit: November 18, 2009, 08:16:10 pm by ofels »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Running Script?
« Reply #8 on: November 19, 2009, 05:24:10 am »
Oliver,

I don't think it's a matter of maturity (although have my doubts sometime  ;)), but rather a matter of ease of use.
If something is difficult to do, users won't do it. That's it, end of story, you can ask them nicely, threaten them all you want.

That's why I try to provide the most easy way to do something, and that includes adding menu-options using an add-in.

Geert

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Running Script?
« Reply #9 on: November 19, 2009, 06:41:05 am »
Quote
Oliver,

I don't think it's a matter of maturity (although have my doubts sometime  ;)), but rather a matter of ease of use.
If something is difficult to do, users won't do it. That's it, end of story, you can ask them nicely, threaten them all you want.

The important thing is: It works here. Because instead of just asking nicely or threatening we have convinced them to accept the overall benefits of running the scripts so we got a commitment. Very good principle- instead of forcing people into unwanted processes convince them to follow rules to get a certain beneficial result.

Oliver