Author Topic: Opening add-in window from script  (Read 2631 times)

bilon

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Opening add-in window from script
« on: May 10, 2018, 11:00:41 pm »
We need to create parametrized script and enable users to set parameters interactively. My idea is to open add-in window from the script, which would enable to change the parameters, and then continue with the script or to call another script which would do the rest of work. Is it possible to do something like this or is it absolute nonsense?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Opening add-in window from script
« Reply #1 on: May 11, 2018, 02:35:18 am »
Yes, you can do that. EA's API offers to create custom windows. There are already a number of (open source) solutions that make use of that.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Opening add-in window from script
« Reply #2 on: May 11, 2018, 02:48:32 am »
If you have installed your add-in, then the public classes in your dll should be registered to COM and thus also be available to the scripting environment.

In VBscript you can use the CreateObject() syntax just like you would with a class from .Net

Geert