In the previous topic, 1.2.1 Introduction to the SIMetrix/SIMPLIS User Interface, you learned how to configure SIMetrix/SIMPLIS using the built-in GUI dialogs. These dialogs allow a limited amount of customization - mostly adding keyboard shortcuts or moving and deleting menu items. In this topic you will learn how scripts can be used to customize the user interface and that using scripts there is almost no limit to what can be customized. Sample scripts which add new menus, keyboard shortcuts, and functionality are included in the course material.
In this topic:
How to further customize and add functionality to the SIMetrix/SIMPLIS user interface using scripts included with the course material.
Included with this course is a set of scripts which add functionality and add shortcuts to existing functions. These scripts are included in the training_scripts.zip file. In the next section, you will install these scripts.
When you run a script, SIMetrix/SIMPLIS searches for the script file in a limited set of directories. One of these directories is your personal script directory, so for the training scripts, you will save the scripts to this directory. The full file path to your personal script directory is set in the Options/Preferences dialog. To find the location of your personal scripts directory, follow these steps:
At this point, You should have the four scripts files from the zip archive in the Scripts directory, along with the startup.sxscr script. All that is left is to tell SIMetrix/SIMPLIS to execute one of the training scripts when the program starts.
When you start SIMetrix/SIMPLIS, the program runs your personal "startup" script. This is script can be used to customize the user interface by adding keyboard shortcuts, menu items, etc. Your personal startup script has the name startup.sxscr and is located in your personal scripts directory. Although you probably haven't edited this script, the program installer created it when you first installed the program.
The zip file has a special training startup script. This implementation was chosen because it doesn't overwrite any changes you may have made to your startup script. All you need to do is tell SIMetrix/SIMPLIS to use the training_startup.sxscr instead of your personal startup.sxscr script.
Training Startup Script Executed Cleanly
At this point you have successfully installed the scripts included with the training material. If you didn't get the Training Startup Script Executed Cleanly message, go back and see if you have the correct Startup script name, and that the scripts are unzipped to the correct file location. Also make sure you don't have the scripts in a sub directory of the Scripts directory.
There are 4 scripts included in the training_scripts.zip file, their file names, functions and a short call hierarchy is described below:
Script File Name | Function | Called By |
training_startup.sxscr | Startup Script | The Program at Startup |
training_startup_menus.sxscr | Adds Menus | training_startup.sxscr |
training_startup_shortcuts.sxscr | Adds keyboard shortcuts | training_startup.sxscr |
training_menu_utilities.sxscr | Worker script | Menu items added in training_startup_menus.sxscr |
The training scripts vary in complexity from very simple to fairly complex. The very simplest scripts add keyboard shortcuts and menu items to the user interface. An example of a fairly complex script is training_menu_utilities.sxscr, which is called with a string argument from several menu options added by the training_startup_menus.sxscr script. The training_menu_utilities.sxscr performs the actions for each menu item.
The script training_startup_shortcuts.sxscr assigns shortcut keys. The shortcut keys, their scope and functions are defined as follows:
Key | Scope | Menu Item | Function |
F2 | all | none (custom) | Toggles the echoOn global variable |
Ctrl+P | Schematic | Opens advanced random probing menu |
The training_startup_menus.sxscr script adds a number of menu items which expand the functionality of the user interface. Currently, menus are added to the schematic menu and to the context or pop-up schematic menu. Each menu item will be covered when it is first used.
If you are curious, you can open a script editor window using the
The drag and drop method will open a new script editor is one is not already open. . You can then either drag and drop a script file from the Windows explorer window, or use the menu to open a file.