Parameters

The Parameters PCB query functions shown in the Query Helper dialog
This reference page details the query language keywords from the Parameters category available in PCB and PCB library documents. For help on a specific query keyword, use the following collapsible sections or highlight (or click inside) any given keyword in the Query Helper or a Filter panel then press F1 to access its section immediately.
CompParameterValue
Summary
Returns the string value of a PCB component parameter, which can be tested to return PCB components that comply with the query.
Syntax
CompParameterValue(ParameterName : String) : String
Example Usage
CompParameterValue('Mounting Technology') Like 'SM*'
Returns all components that incorporate the Mounting Technology parameter that has a value string beginning with SM, such as SMT, SMD, etc. The associated child objects of a complying component object, such as tracks, arcs, pads, text etc., are also returned.
CompParameterValue('Mounting Technology') Like '*SM*'
Returns all components and their associated child objects where the Mounting Technology parameter has a value string that includes *SM*.
StrToNumber(CompParameterValue('VoltageRating'),V) > 50
Returns all components and their associated child objects where the VoltageRating parameter value is greater than 50 volts. The string value returned by CompParameterValue is converted to a number for the comparison by the unit-aware StrToNumber function.
FootprintParameterValue
Summary
Returns the string value of a PCB Footprint parameter, which can be tested to return PCB components that comply with the query.
Syntax
FootprintParameterValue(ParameterName : String) : String
Example Usage
FootprintParameterValue('Mounting Type') Like 'SMD'
Returns all components and their associated child objects where the Mounting Type Footprint parameter has a value string that includes SMD.
HasCompParameter
Summary
Returns PCB components incorporating the specified parameter name.
Syntax
HasCompParameter(ParameterName : String) : Boolean
Example Usage
HasCompParameter('Mounting Technology')
HasCompParameter('Mounting Technology') = True
Returns all component parent objects that have the Mounting Technology parameter name. The associated child objects of a complying component object, such as tracks, arcs, pads, text etc., are also returned.
Not HasCompParameter('Mounting Technology')
HasCompParameter('Mounting Technology') = False
Returns all components and their associated child objects, except for those component parent objects that have the Mounting Technology parameter.
HasCompParameterValue
Summary
Returns PCB components that incorporate the specified parameter name that has a value that complies with the query.
Syntax
HasCompParameterValue(ParameterName : String , ParameterValue : String) : Boolean
Example Usage
HasCompParameterValue('Mounting Technology','SMT')
HasCompParameterValue('Mounting Technology','SMT') = True
Returns all component parent objects that have the Mounting Technology parameter name with a matching value property of SMT. The associated child objects of a complying component object, such as tracks, arcs, pads, text, etc., are also returned.
Not HasCompParameterValue('Design Item Status','RoHS-Compliant')
HasCompParameterValue('Design Item Status','RoHS-Compliant') = False
Returns all components and their associated child objects that do not have a Design Item Status parameter with a value of RoHS-Compliant.
HasFootprintParameter
Summary
Returns PCB components incorporating the specified Footprint parameter name.
Syntax
HasFootprintParameter(ParameterName : String) : Boolean
Example Usage
HasFootprintParameter('IPC Density')
HasFootprintParameter('IPC Density') = True
Returns all component parent objects that have the IPC Density Footprint parameter name. The associated child objects of a complying component object, such as tracks, arcs, pads, text, etc., are also returned.
Not HasFootprintParameter('IPC Density')
HasFootprintParameter('IPC Density') = False
Returns all components and their associated child objects, except for those component parent objects that have the IPC Density Footprint parameter.
HasFootprintParameterValue
Summary
Returns PCB components that incorporate the specified Footprint parameter name that has a value that complies with the query.
Syntax
HasFootprintParameterValue(ParameterName : String , ParameterValue : String) : Boolean
Example Usage
HasFootprintParameterValue('Mounting Method','Press Fit')
HasFootprintParameterValue('Mounting Method','Press Fit') = True
Returns all component parent objects that have the Mounting Method Footprint parameter name with a matching value property of Press Fit. The associated child objects of a complying component object, such as tracks, arcs, pads, text, etc., are also returned.
Not HasFootprintParameterValue('Mounting Method','Press Fit')
HasFootprintParameterValue('Mounting Method','Press Fit') = False
Returns all components and their associated child objects that do not have a Mounting Method Footprint parameter with a value of Press Fit.
HasParameter
Summary
Returns PCB objects incorporating the specified parameter name.
Syntax
HasParameter(ParameterName : String) : Boolean
Example Usage
HasParameter('Mounting Technology')
HasParameter('Mounting Technology') = True
Returns all objects that have the Mounting Technology parameter name.
Not HasParameter('Mounting Technology')
HasParameter('Mounting Technology') = False
Returns all objects except those that have the Mounting Technology parameter.
HasParameterValue
Summary
Returns PCB objects incorporating the specified parameter name that has a value that complies with the query.
Syntax
HasParameterValue(ParameterName : String , ParameterValue : String) : Boolean
Example Usage
HasParameterValue('Mounting Technology','SMT')
HasParameterValue('Mounting Technology','SMT') = True
Returns all objects that have the Mounting Technology parameter name and a matching value property of SMT.
Not HasParameterValue('Design Item Status','RoHS-Compliant')
HasParameterValue('Design Item Status','RoHS-Compliant') = False
Returns all objects that do not have a Design Item Status parameter with a value of RoHS-Compliant.
ParameterValue
Summary
Returns the string value of a PCB object parameter, which can be tested to return PCB objects that comply to the query.
Syntax
ParameterValue(ParameterName : String) : String
Example Usage
ParameterValue('Mounting Technology') Like 'SM*'
Returns all objects with the Mounting Technology parameter that has a value string beginning with SM, such as SMT, SMD, etc.
ParameterValue('Mounting Technology') Like '*SM*'
Returns all objects with the Mounting Technology parameter that has a value string that includes SM.
StrToNumber(ParameterValue('VoltageRating'),V) > 50
Returns all objects that have a VoltageRating parameter value greater than 50 volts. The string value returned by ParameterValue is converted to a number for the comparison by the unit-aware StrToNumber function.
StrToNumber
Summary
Converts the nominated parameter value string to a number using the stipulated unit type.
Syntax
StrToNumber(Value : String , Unit : String) : Number
Example Usage
StrToNumber(ParameterValue('VoltageRating'),V) > 50
Converts the value string returned by the VoltageRating parameter to a number, using volts (V) as the unit, then returns all objects with a value greater than 50V.
StrToNumber(ParameterValue('Resistance'),Ohms) Between 1000 And 10000
Converts the value string returned by the Resistance parameter to a number, using ohms as the unit, then returns all objects with a value between 1kΩ and 10kΩ.
StrToNumber(ParameterValue('CapacitanceValue'),F) < 2e-9
Converts the value string returned by the CapacitanceValue parameter to a number, using Capacitance (F) as the unit, then returns all objects with a value less than 2nF (2e-9 in scientific notation).
Notes
A scripting error will be thrown if the value string cannot be converted to a number. To allow for this situation, use the StrToNumber function, which returns a nominated default number if the conversion fails.
The unit-aware string-to-number converter function accepts a large range of Unit type definitions, including:
- V – Voltage
- A – Current
- Ohm – Resistance
- Z – Impedance
- F – Capacitance
- H – Inductance
- G – Conductance
- W – Power
- Hz – Frequency
- Q – Charge
- C – Temperature
- dB – Decibels
- % – Percent
- m – Length
- Kg – Mass
- s – Time
The converter accepts standard value scaling factors (micro, kilo, mega, etc.,) and, therefore, parameter strings containing prefix abbreviations such as mV, uA, kHz, etc.
Several value constructs are also supported. For example, the same resistance value can be represented as:
- 2k2
- 2.2k
- 2200
- 2,200
StrToNumberDef
Summary
Converts the nominated parameter value string to a number, or a default number, using the stipulated unit type.
Syntax
StrToNumber(Value : String , Unit : String , Default : Number) : Number
Example Usage
StrToNumberDef(ParameterValue('VoltageRating'),V,10) > 50
Converts the value string returned by the VoltageRating parameter to a number, using voltage (V) as the unit, then returns all objects with a value greater than 50V. If the parameter string or unit is unrecognized (cannot be converted), a default value of 10 is returned.
StrToNumberDef(ParameterValue('VoltageRating'),'V',6) Between 10 And 50
Converts the value string returned by the VoltageRating parameter to a number, using voltage (V) as the unit, then returns all objects with a value rating between 10V and 50V. If the value cannot be read, a voltage of 6V (the defined default value) is assumed.
Notes
The unit-aware string-to-number converter function accepts a large range of Unit type definitions, including:
- V – Voltage
- A – Current
- Ohm – Resistance
- Z – Impedance
- F – Capacitance
- H – Inductance
- G – Conductance
- W – Power
- Hz – Frequency
- Q – Charge
- C – Temperature
- dB – Decibels
- % – Percent
- m – Length
- Kg – Mass
- s – Time
The converter accepts standard value scaling factors (micro, kilo, mega, etc.,) and, therefore, parameter strings containing prefix abbreviations such as mV, uA, kHz, etc.
Several value constructs are also supported. For example, the same resistance value can be represented as:
- 2k2
- 2.2k
- 2200
- 2,200