Setting Numerical Values
For script arguments that expect a number, the following options are possible:
- Pass in the number directly.
In IronPython:
oModule.EditVoltage('Voltage1', ['NAME:Voltage1', 'Voltage:=', 3.5])
In VBscript:
oModule.EditVoltage "Voltage1", Array("NAME:Voltage1", "Voltage:=", 3.5)
- Pass in a string containing the number with units.
In IronPython:
oModule.EditVoltage('Voltage1', ['NAME:Voltage1', 'Voltage:=', '3.5V'])
In VBscript:
oModule.EditVoltage "Voltage1", Array("NAME:Voltage1", "Voltage:=", "3.5V" )
- Pass in a variable name.
In IronPython:
var = 3.5
oModule.EditVoltage('Voltage1', ['NAME:Voltage1', 'Voltage:=', var]
In VBscript:
dim var
var = "3.5V"
oModule.EditVoltage "Voltage1", Array("NAME:Voltage1", "Voltage:=", var)