Welcome to the EMTP® Help Center
How to trigger a script in EMTP
I. From the Script tab
- Create a new JavaScript document (ctrl + N)
- Click on run
This method is good for small scripts.
The EMTP code editor must be used.
II. From the Design tab
1. Click on Run a script
This method calls script file (.dwj).
Any JavaScript code editor can be used.
III. From a button
A. Create the button:
1. In the options tab, click on New Part
2. Draw the button
3. Close the drawing tab and save the new part in a library. A new library can be created for this.
4. In the EMTP design, drag and drop the newly built component
B. Create the button:
- Right click on the device and go to Attributes
- Check All
- Under the attribute Script.Open.Dev, enter the relative or full path to the script to call.
- Set the Exclude attribute to 2.
- Double click on the button to start the script
This method calls script file (.dwj).
Any JavaScript code editor can be used.
Example folder: Click here