Author Topic: Adding a toolbar button to run a Script  (Read 4414 times)

Alberto Favetta

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Adding a toolbar button to run a Script
« on: July 09, 2013, 12:40:51 am »
Hello,

I created a VBScript code to do some automation stuff. I would like to add a simple toolbar button to run that script without going through Tools->scripting->select script->run

Is there a way to accomplish this?

Cheers,
Alberto

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Adding a toolbar button to run a Script
« Reply #1 on: July 09, 2013, 01:06:52 am »
Hello Alberto,

you can't  assign a script to a toolbar button.

You can add a script to the context menu. Then Right Click, Scripts, Scriptname.

To add a script to the context menu:
- Create a Script Group of Type Browser, Diagram,..
- Drag the script into this Script group
- The script appears in the context menu according to the script group
  (Browser, Diagram,..)

If you want your script to work on browser and on diagram you have to duplicat the script and but it in Browser Group and in Diagram Group

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Alberto Favetta

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Adding a toolbar button to run a Script
« Reply #2 on: July 09, 2013, 04:32:05 pm »
Quote
Hello Alberto,

To add a script to the context menu:
- Create a Script Group of Type Browser, Diagram,..
- Drag the script into this Script group
- The script appears in the context menu according to the script group
  (Browser, Diagram,..)

Thank you very much, that did the trick nicely  :)

Alberto