The Script Engine allows you to integrate your own or already existing scripts to customize PCB-Investigator according to your needs. |
The "Script Engine" allows you to write your own code in a script an use it within PCB-Investigator. To open the dialog click the "Script Engine" button.
After opening the "Script Engine" dialog for the first time, you will see two scripts in your "Favorites" tab for demonstration purposes.
Add scripts to local/favorites tab
To add scripts to the local tab, there are two ways.
1. Create your own script: To create your own script, you can add it by using the "File" tab at the bottom or by just right clicking on the white area in tab control
Both possibilities allow you to add a new script. There are different types of scripts you can add. These types do act completely different.
2. Add a "Web" script (already existing script)
To add an existing script switch to the "Web" tab. The opened "web" should look similar to the following image. With the "search" field at the top of the window you can search for a certain name or description.
To add a web script to your local/favorites tab, right click on the desired script. This shoul look like the following image.
After you added it to your favorites or local tab, you can edit them. Switch to the "Local" tab, if you want to edit the code.
The "Local"/"Favorites" tab now contains your desired added script.
Adding a local script to you favorites can also be done by right clicking the script and choosing the "Add to Favorites" option. Scripts can also be organized in sub folders for a better categorization.
IMPORTANT:
Common options:
Starts running the script. Starting the script will automatically compile the code first. You can either start running using the right click on a script and clicking "Run" or just by clicking the green start button at the top of the dialog.
Stops running the dialog by clicking the red square button.
With this button, you can compile your code. Compile errors will be shown in the list at the bottom of the window.