PromoteScalar()

The PromoteScalar() function allows you to copy a specified scalars from the test to the overview report. These copied scalars appear in the "Calculated Results" section of the overview report between the design specifications and the spreadsheet-compatible results. This function also allows you to rename the scalars, effectively creating aliases on the overview report.

In this topic:

The PromoteScalar() function has two versions:

  • PromoteScalar(scalar_name)
  • PromoteScalar(scalar_name, overview_scalar_name)
    Argument Range Description
    scalar_name n/a An ASCII string value only with no spaces or other non-alphanumeric characters.
    overview_scalar_name n/a A string value that may contain spaces and other non-alphanumeric characters.*

    *   The spaces and non-alphanumeric characters in the overview_scalar_name helps to clarify what the scalar value represents on the overview report since an auto-generated scalar name is often not as descriptive as it could be.

▲ back to top

Example

A scalar value exists with the name "pk_v_R1" and a value of 43.7. The following calls in the testplan will promote the scalar value to the overview report.

  • PromoteScalar(pk_v_R1)
  • PromoteScalar(pk_v_R1, Peak Voltage on R1 (V))
Note: The scalar_name argument, pk_v_R1, contains no spaces. The overview_scalar name,  Peak Voltage on R1 (V), uses spaces and parentheses to clarify the description on the report.

▲ back to top

Using PromoteScalar() as a Script Function

PromoteScalar() also exists as a SIMetrix script function and can be called from a post-process or final-process script. When called from a script the value of the scalar must be known or calculated and passed into the script function. The arguments for this function when called from a script are slightly different than the testplan version. The script function syntax is as follows:

SimplisDVMAdvancedUtilMeasurementPromoteScalar(array, log_file)

where array is a SIMetrix string array with two or three elements:

  • scalar_name
  • value
  • overview_scalar_name (optional)

The syntax for the two script functions is as follows:

Let return = SimplisDVMAdvancedUtilMeasurementPromoteScalar([ scalar_name, value ], log_file)
Let return = SimplisDVMAdvancedUtilMeasurementPromoteScalar([ scalar_name, value, overview_scalar_name ], log_file)

The examples above could be generated in a PostProcess script with the following calls:

Let return = SimplisDVMAdvancedUtilMeasurementPromoteScalar([ 'pk_v_R1', '43.7' ], log_file)
Let return = SimplisDVMAdvancedUtilMeasurementPromoteScalar([ 'pk_v_R1', '43.7', 'Peak Voltage on R1 (V)' ], log_file)

The script function return value may be safely ignored.

▲ back to top