Advanced SIMPLIS Training

1.2.1 Introduction to the SIMetrix/SIMPLIS User Interface

In this Topic Hide

What You Will Learn

Getting Started

In this topic, you will learn three ways that you can customize the SIMetrix/SIMPLIS user interface:

Change the Default Simulator and Enable GUI Property Editing

To get started, you will set some global options that will help with this course material. Many of these options will also help in your day-to-day work with SIMetrix/SIMPLIS. Once set, the global options persist and are defined to configure SIMetrix/SIMPLIS every time you use the program.

To edit the global options, follow these steps:

  1. From the command shell menu, select File Options General.
    Result: The Options/Preferences Dialog opens to the Schematic Editor tab:

  2. In the Initial Simulator box in the lower right corner, click the radio button in front of SIMPLIS .
    Result: Each new schematic will now use the SIMPLIS simulator. Existing schematics are unaffected.

  3. In the Property editing box in the lower center, check Enable GUI property edits.
    5 Result: This option allows you to double click on any visible symbol property to edit that property. The Options/Preferences dialog should now look like the following:

  4. Click Ok to accept the dialog and save the options.
    Result: The dialog closes, and SIMetrix/SIMPLIS saves your preferences.

Change the Default Text Editor to Notepad++

In this section, you will change the default text editor from Notepad to Notepad++. If you don't currently have Notepad++, you can download the program from the here.

  1. From the SIMetrix/SIMPLIS command shell menu, select File Options General.
    Result: The Options/Preferences Dialog opens to the Schematic Editor tab with your changes displayed from the previous section.

  2. To change the editor, click the File Locations tab. If it is not visible, first click the right arrow on the tab bar to bring the tab into view.
    Result: The default File Locations tab opens with your default paths and programs.

  3. To change the editor to Notepad++, double click on the Editor Item.
    Result: An Explorer window opens for you to select the Notepad++ executable.

  4. Navigate to the location where Notepad++ is installed, which is typically C:\Program Files (x86)\Notepad++\notepad++.exe.

  5. Select the notepad++.exe file, and click Open.
    Result: The options dialog is updated to show that the new editor is Notepad++.

  6. Click Ok to save the options.
    Result: The dialog closes, and SIMetrix/SIMPLIS saves your preferences.

Add the User Defined Languages File to Notepad++.

Included with this course material is a file containing the Notepad++ user-defined languages. This is a text file in XML format which identifies two languages for SIMetrix/SIMPLIS:

To install this file, follow these steps:

  1. Click on the following link to open the userDefineLang.zip file.

  2. On the resulting dialog, select Open with Windows Explorer.

  3. On the Explorer window, select Extract all files.

  4. Extract the file to your desktop.

  5. Open Notepad++.

  6. From the menu bar in Notepad++, select Language Define your language...
    Result: The User Defined Language dialog opens:

  7. Click the Import... button.
    Result: An Explorer window opens for you to select the previously saved user-defined language file.

  8. Navigate to your desktop, and select the userDefineLang.xml file.

  9. Click Open.
    Result: An "Import successful." dialog is displayed.

  10. Click Ok.

  11. Close the User Defined Language Dialog using the red "X" in the upper right hand corner of the dialog.

  12. Close Notepad++.

The next time you open Notepad++, the user-defined languages listed in the userDefineLang.xml file will be used. During the import process, Notepad++ makes a copy of the user-defined language file and saves this to your AppData directory. You can, therefore, safely delete the userDefineLang.xml file from your desktop.

Discussion

At this point, you have personalized your SIMetrix/SIMPLIS installation to use a few custom options. Next you will consider how the user interface is constructed and how you can further modify the user interface to better suit your personal needs.

Every menu item and keyboard shortcut is implemented with the SIMetrix/SIMPLIS script language. The menus you see on the different windows are not a permanent part of the program but are created from scratch every time the program starts. This gives you a great deal of flexibility in adding new menu items as well as moving or deleting existing menu items.

Reassigning a Shortcut Key Using the GUI Editor

In this exercise, you will reassign the "Ctrl+S" keyboard shortcut to save the current schematic. By default this shortcut key shows the node name under the mouse cursor.

  1. From the SIMetrix/SIMPLIS command shell menu, select File Options Edit Menus...
    Result: The Edit Menu System dialog opens

  2. Click the "+" in front of the SimplisSchematic item.
    Result: The SIMPLIS schematic menu items appear, starting with File, then Edit, etc...

  3. Click the "+" in front of the &File item.

  4. Click the &Save item.
    Result: The dialog should now look as follows:

  5. Click the Accelerator... button.
    Result: The Rebind Key dialog appears:

  6. Press and hold the Ctrl key while pressing the S key.
    Result: The Warning - binding &Save dialog appears:

  7. Click Ok.
    Result: Your new key binding has been saved.

To verify the new key binding:

  1. Open a schematic with the command shell menu, File New Schematic.

  2. Press Ctrl+S.
    Result: The File Save As dialog opens because the schematic is untitled. If you had previously saved the schematic, the schematic would save without prompting for a filename.

Behind the Scenes

Every menu item or keyboard shortcut executes either a SIMetrix/SIMPLIS script or a simple script command. A script file is a sequence of commands or calls to other scripts. The user interface is built from a set of approximately 900 scripts. Here is a short example using the edit_options.sxscr script:

  1. Type edit_options into the command line of the SIMetrix/SIMPLIS command shell.

  2. Press Enter or click Ok.
    Result: The Options/Preferences dialog opens exactly as if you had selected File Options General from the command shell menu.

The edit_options script is a built-in script and can be downloaded in another browser window by clicking here.

From a functional point of view, there is no difference between using the menu item, the keyboard shortcut (if there is one) or hand-typing the script name into the command line. These user interface scripts are called Built-In or BiScripts and can be downloaded from the ERROR: Variable (download_links_page) is undefined. page.

Note: You will need an in-maintenance license to access the script source.

In this section, you have used the Edit Menu System dialog to modify the user interface. In the next section, 1.2.2 Customizing the User Interface, you will download and install a set of scripts specially prepared for this training session. These scripts automate the process of setting keyboard shortcuts and further extend the functionality of the user interface.

Conclusions and Key Points to Remember

© 2015 simplistechnologies.com | All Rights Reserved