Load Component Values

The Load Component Values feature allows you to quickly change component values in your design without having to edit each component individually. Multiple designs that use the same schematic can be configured easily by saving a configuration file containing a set of component values. Each design can then be configured by loading the appropriate configuration file. Refer to the following topics:

In this topic:

Overview

The Load Component Values feature can change any schematic symbol property, however; the schematic configuration, including symbol placement and wiring, are unchanged. The Load Component Values feature works for both the SIMetrix and the SIMPLIS simulator modes.

CAUTION: Be sure to backup your schematic before loading a set of component values. When you load a configuration file, the schematic values change and this action cannot be undone.

The Load Component Values feature does the following:
  • Load component property values from a text file
  • Change each component in the design according to the values in text file
  • Produces a report In the SIMetrix/SIMPLIS command shell, detailing the properties that were changed.

Menus

There are six menu items under the main menu Tools > Load Component Values. These are:
Overview Opens this help topic
Create Config File from Schematic... Creates a component-value configuration file from the currently selected schematic
From Default File Loads component values from the default text file. The default text filename is <schematic_name>.compvalues.txt
Select a File to Load... Prompts for a configuration file to load.
Edit Configuration File... Prompts for a configuration file to edit.
View Log File... Views values in last component-value log file.

Configuration File Format

The configuration file is a plain ASCII text file with two columns separated by a tab character. Following are the rules for the configuration file:
  • Blank lines and comment lines (starting with *) are ignored.
  • Each non-blank, non-comment line is assumed to be a load-component-value directive.
  • Load-component-value directives are in the following form:
    ADDRESS VALUE
    L1.DCR 5m
  • The ADDRESS information should point to an explicit designator.property combination. For example, a resistance value is specified as R1.VALUE, not merely R1. Note: The correct ADDRESS for any given parameter depends heavily on the type of symbol that is being used, not merely the type of component. The program supports many standard symbols, but custom or seldom-used symbols may require some tweaking in order to get the desired behavior. ADDRESS and VALUE must be separated by tabs.
  • The VALUE should appear exactly as you want it to be set in the component. For values containing white-space characters, enclose the value in double quotes (").

Creating a Configuration File from the Schematic

To create a configuration file from the schematic, follow these steps:
  1. Select menu Tools > Load Component Values > Create Config File from Schematic... The system reads all schematic symbols on the currently selected schematic and creates a component-value configuration file.
  2. At the file selection dialog, type a filename and select a location to save the configuration file. The configuration file contains symbol properties only for component values that can be successfully loaded. Property values with spaces are automatically double quoted per the required configuration file format. Property values that are protected or that contain the double quote character are excluded from the generated configuration file.
  3. Edit the configuration file using the menu

    Tools > Load Component Values > Edit Configuration File... to remove any load component value directives which you don't need.

Loading a Configuration File

CAUTION: Be sure to backup your schematic before loading a set of component values. When you load a configuration file, the schematic values change and this action cannot be undone.

An example including the schematic and a configuration file can be downloaded here : simplis_003_load_comp_values_MP8708.zip.

To load component values for this design, follow these steps:
  1. Unzip the archive to a location on your computer.
  2. To open the schematic, double click the .sxsch file or drag that file into the SIMetrix/SIMPLIS Command Shell.
  3. Execute one of the menu options from the Load Component Values menu:
    • Tools > Load Component Values > From Default File
    • Tools > Load Component Values > Select a File to Load...

The schematic reflects the new values, and the following report appears in the command shell window.

Located default component value input file (<path>/simplis_003_load_comp_values_MP8708.compvalues.txt).
Action: refdes old new
------- ------ --- ---
No Change Vin.VC 12 12
No Change Vin.ESR 1m 1m
Change C5.CC 22u 4.7u
No Change C6.CC 1 1u
No Change C10.CC 100n 100n
No Change C11.CC 1u 1u
Change L1.LI 1.8u 4.2u
No Change C7.CC 22u 22u
Change C7.QUANTITY 2x 2
No Change C9.CC 1p 1p
Change R1.VALUE 40.2k 59k
Change R2.VALUE 12.7k 19.1k
Load component value -- complete @ XX:XX:XX

You may also view the log file with the Tools > Load Component Values > View Log File... menu.

Handling Shorted or Disabled Components

Since symbols do not contain a property indicating whether or not it is shorted or disabled, a special flag can be used to disable, short, or re-enable a schematic instance.

ADDRESS VALUE
L1._disabled_status_ 'open'
L2._disabled_status_ 'short'
L3._disabled_status_ 'enable'

Loading XML Content

XML content can be loaded from within the Load Component Values file or directly from an XML file. Directly loading from a file can be completed by using the "_from_file|" tag. Both relative and absolute addresses are acceptable.

ADDRESS VALUE
L1.GMD_FILE_CONTENTS "<?xml version='1.0' encoding='UTF-8'?><inductor> ... </inductor>"
L2.GMD_FILE_CONTENTS _from_file|'./xml_file - relative.gmd'
L3.GMD_FILE_CONTENTS _from_file|'C:/temp/xml_file - absolute.gmd'

Automating Load Component Values with Command line Switches

A special switch /l ( the letter l, not the numeral 1) has been added to SIMetris/SIMPLIS to automatically open a schematic and load a set of component values when the program starts. The syntax for the command line switch is:

<full_path_to_simetrix.exe> <full_path_to_schematic_to_open> /l <full_path_to_comp_values_file>

Note each of the three command line arguments are full paths.

Automating Load Component Values with a Script

The load component values feature is provided by the script load_comp_values.sxscr. The script has one optional argument -- a filename. Without the optional argument, the script attempts to load the default file, which is <schematic_name>.compvalues.txt. If that file cannot be found or cannot be opened, a file selection dialog opens to allow you to select a configuration file.
  • To load the default file, type load_comp_values at the SIMetrix/SIMPLIS command line.
  • To load a different filename, type load_comp_values '<config_filename>' at the SIMetrix/SIMPLIS command line. Note the filename is enclosed in single quotes.
The load component values script can be called from any SIMetrix Script. The scripting language is available only in the full version of SIMetrix/SIMPLIS, although the script feature can be temporarily unlocked in SIMetrix/SIMPLIS Elements by using the Unlock feature.