Change()

The Change() function attempts to alter the component property identified by a property_address, which provides a path to the component .

Important: This function makes the change directly in the schematic and, thus, results in a permanent change that  you may not intend to make.

In this topic:

Change() Syntax

The Change() function has the following syntax: Change(property_address, value)

  • The property_address is a dot (.) separated string that specifies the path to the property that you want to change.
  • The value argument indicates the change that you want to make.

▲ back to top

Example

The following example illustrates how to change the gain value of a component on a sub-schematic:
Change(U1.U3.GAIN,1)

The function call above does the following:

  • Attempts to locate a component U1.
  • Opens the U1 sub-schematic.
  • Locates a component U3 in the U1 sub-schematic
  • Then sets the GAIN property on the U3 component to 1.

▲ back to top

Inline vs. Header Row Function Behavior

The Var(), GlobalVar(), Change() and Temp() functions behave differently depending on whether they are used inline or in a header row.

  • When used inline, Var(), GlobalVar(), Change(), and Temp() perform the actions described above.
  • When used in a header row, value is interpreted to be the default as listed in the header row and is used if the test has no value in its column.

    For example, the following testplan with a header row performs the actions listed below:

    1 *?@ Var(MAX_Q,1n) GlobalVar(VIN,12) Change(U1.U3.GAIN,1)
    2 2n    
    3   5.0  
    4     0.5
    • The test on line 2 sets the variable MAX_Q  to 2n based on the value in line 2. Because columns 2 and 3 on line 2 are empty, the global variable VIN to 12 and the GAIN property on U1.U3 is change to 1.
    • The test on line 3 sets the global variable VIN to 5.0. Because columns 1 and 3 on line 3 are empty,  MAX_Q  is set to 1n and the GAIN property on U1.U3 is changed to 1.
    • The test on line 4 changes the GAIN property on U1.U3 to 0.5. Because columns 1 and 2 on line 4 are empty, MAX_Q  is set to 1n sets VIN is set to 12.

▲ back to top