PCB Layout Membership Checks Query Functions in Altium Designer

Created: May 8, 2023 | Updated: May 8, 2023
Applies to Altium Designer versions: 23 and 24

Parent page: PCB Layout Query Functions

The Membership Checks PCB query functions shown in the Query Helper dialog
The Membership Checks PCB query functions shown in the Query Helper dialog

This reference page details the query language keywords from the Membership Checks category available in PCB and PCB library documents in Altium Designer. 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 - and press F1 to access its section right away.

Summary

For numeric properties of objects (e.g. height, width, radius, etc), this keyword is used to convert the current value - measured in the default workspace units - into imperial units - mil - where 1mil = 0.001inch, which is then tested against the value entered in the expression.

Syntax

AsMils(Keyword : Number) : Number

Example Usage

AsMils(ArcRadius) = 250
Returns all arc objects that have a Radius property which is 250mil.

AsMils(Height) Between 300 And 500
Returns all component objects that have a Height property which is greater than, or equal to, 300mil, and less than, or equal to, 500mil.

AsMils(PolygonGridSize) >= 10
Returns all polygon pour objects that have a Grid Size property which is greater than, or equal to, 10mil.

AsMils(Width) < 50
Returns all arc and track objects that have a Width property which is less than 50mil.

AsMils(TraceLength) = 10
Returns all arc and track objects that have a Length which is equal to 10mil.

Note - due to an issue in the software, to correctly detect the TraceLength using the AsMils keyword the board units must be set to mils before running the query.

Summary

For numeric properties of objects (e.g. height, width, radius, etc), this keyword is used to convert the current value - measured in the default workspace units - into metric units - mm - where 1mm = 0.001meter, which is then tested against the value entered in the expression.

Syntax

AsMM(Keyword : Number) : Number

Example Usage

AsMM(ArcRadius) = 6.35
Returns all arc objects that have a Radius property which is 6.35mm.

AsMM(Height) Between 7.62 And 12.7
Returns all component objects that have a Height property which is greater than, or equal to, 7.62mm, and less than, or equal to, 12.7mm.

AsMM(PolygonGridSize) >= 0.254
Returns all polygon pour objects that have a Grid Size property which is greater than, or equal to, 0.254mm.

AsMM(Width) < 1.27
Returns all arc and track objects that have a Width property which is less than 1.27mm.

AsMM(TraceLength) = 1
Returns all arc and track objects that have a Length which is equal to 1mm.

Note - due to an issue in the software, to correctly detect the TraceLength using the AsMM keyword the board units must be set to mils before running the query.

Summary

Returns all component objects whose Layer property matches a layer that is a member of the specified Layer Class.

Syntax

ComponentInLayerClass(ClassName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined layer classes, by name, is presented.

Example Usage

ComponentInLayerClass('TopSide')
ComponentInLayerClass('TopSide') = True
ComponentInLayerClass('TopSide') = 'True'

Returns all component objects whose Layer property matches a layer that is a member of the TopSide Layer Class.

Not ComponentInLayerClass('BottomSide')
ComponentInLayerClass('BottomSide') = False
ComponentInLayerClass('BottomSide') = 'False'

Returns all objects except component objects whose Layer property matches a layer that is a member of the BottomSide Layer Class.

Notes

The single quote characters (') at the start and end of the ClassName string are mandatory.

Summary

Returns all objects that exist on the specified layer.

Syntax

ExistsOnLayer(Layer : String) : Boolean/Boolean_String

Layer is the name of the layer as it appears on the Layers & Colors tab of the View Configuration panel.

Example Usage

ExistsOnLayer('Top Layer')
ExistsOnLayer('Top Layer') = True
ExistsOnLayer('Top Layer') = 'True'

Returns all objects that exist on the Top Layer.

Not ExistsOnLayer('Mechanical 3')
ExistsOnLayer('Mechanical 3') = False
ExistsOnLayer('Mechanical 3') = 'False'

Returns all objects except objects that exist on the Mechanical 3 layer.

Notes

The single quote characters (') at the start and end of Layer are mandatory.

Summary

Returns all component objects whose Footprint property complies with the Query.

Syntax

HasFootprint(Footprint : String) : Boolean/Boolean_String

Example Usage

HasFootprint('SIP?0')
HasFootprint('SIP?0') = True
HasFootprint('SIP?0') = 'True'

Returns all component objects whose Footprint property starts with SIP and finishes with 0, and includes one other intermediate character. Example compliant footprints include SIP10, SIP20, and SIPQ0.

HasFootprint('DIP*')
HasFootprint('DIP*') = True
HasFootprint('DIP*') = 'True'

Returns all component objects whose Footprint property starts with DIP. Example compliant footprints include DIP8, DIP14, and DIP24N.

Not HasFootprint('IDC16')
HasFootprint('IDC16') = False
HasFootprint('IDC16') = 'False'

Returns all objects except component objects whose Footprint property is IDC16.

HasFootprint('*2*')
HasFootprint('*2*') = True
HasFootprint('*2*') = 'True'

Returns all component objects whose Footprint property includes the character 2. Example compliant footprints include 2012, 2N5001, IDC20, and HDR1X2.

Notes

  • The single quote characters (') at the start and end of the Footprint string are mandatory.
  • For each returned component object, its associated child objects are also returned.

Summary

Returns all pad objects that are children of component objects with the specified Footprint, and where the pad's Name property complies with the Query.

Syntax

HasFootprintPad(Footprint : String,Name : String) : Boolean/Boolean_String

Example Usage

Not HasFootprintPad('0805','1')
HasFootprintPad('0805','1') = False
HasFootprintPad('0805','1') = 'False'

Returns all objects except pad objects whose Name property is 1, and which are child objects of component objects whose Footprint property is 0805.

HasFootprintPad('SIP?0','1')
HasFootprintPad('SIP?0','1') = True
HasFootprintPad('SIP?0','1') = 'True'

Returns all pad objects whose Name property is 1, and which are child objects of component objects whose Footprint property starts with SIP, finishes with 0, and includes one other intermediate character. Example compliant footprints include SIP10, SIP20, SIPQ0.

HasFootprintPad('DB*','MNT')
HasFootprintPad('DB*','MNT') = True
HasFootprintPad('DB*','MNT') = 'True'

Returns all pad objects whose Name property is MNT, and which are child objects of component objects whose Footprint property starts with DB. Example compliant footprints include DB9S, DB15HD, DB25P.

HasFootprintPad('','MN*')
HasFootprintPad('','MN*') = True
HasFootprintPad('','MN*') = 'True'

Returns all pad objects whose Name property starts with MN, and which are child objects of any component object.

Notes

  • The single quote characters (') at the start and end of the Footprint and Name strings are mandatory.
  • The parent component objects are not returned.

Summary

Returns all arc, fill, pad, region, track, and via objects that have Paste Mask Expansion (except via), or Solder Mask Expansion values, defined for the specified layer. Values may be defined manually, or taken from the applicable defined design rule.

Syntax

HasMaskExpansionOnLayer(Layer : String) : Boolean/Boolean_String

Layer is the name of the layer, as it appears in the applicable Layers section, on the Layers & Colors tab of the View Configuration panel.

Example Usage

HasMaskExpansionOnLayer('Top Layer')
HasMaskExpansionOnLayer('Top Layer') = True
HasMaskExpansionOnLayer('Top Layer') = 'True'

Returns all arc, fill, pad, region, track, and via objects that have Paste Mask Expansion (except via), or Solder Mask Expansion values, defined for the Top Layer.

Not HasMaskExpansionOnLayer('Bottom Layer')
HasMaskExpansionOnLayer('Bottom Layer') = False
HasMaskExpansionOnLayer('Bottom Layer') = 'False'

Returns all objects except arc, fill, pad, region, track, and via objects that have Paste Mask Expansion (except via), or Solder Mask Expansion values, defined for the Bottom Layer.

Notes

The single quote characters (') at the start and end of Layer are mandatory.

Summary

Returns all pad objects whose full name property complies with the Query.

Syntax

HasPad(PadName : String) : Boolean/Boolean_String

The PadName string specifies the full name that a pad has to match; this consists of an initial substring which specifies the Name property of the pad's parent component (i.e. the component's Designator), followed by a substring that specifies the pad's own Name property (i.e. the pad's Designator). The format will therefore be 'ParentComponentDesignator-PadDesignator'.

Example Usage

Not HasPad('C14-1')
HasPad('C14-1') = False
HasPad('C14-1') = 'False'

Returns all objects except the pad object whose Name property is 1, and which is a child object of the component object whose Name property is C14.

HasPad('U5-11')
HasPad('U5-11') = True
HasPad('U5-11') = 'True'

Returns the pad object whose Name property is 11, and which is a child object of the component object whose Name property is U5.

HasPad('U*-11')
HasPad('U*-11') = True
HasPad('U*-11') = 'True'

Returns all pad objects whose Name property is 11, and which are child objects of component objects whose Name property starts with U.

HasPad('*-1*')
HasPad('*-1*') = True
HasPad('*-1*') = 'True'

Returns all pad objects whose Name property starts with 1, and which are child objects of any component object.

Notes

The single quote characters (') at the start and end of the PadName string are mandatory.

Summary

Returns all via objects whose via feature property complies with the Query.

Syntax

HasViaFeature(ViaFeature : String) : Boolean/Boolean_String

The ViaFeature string specifies the via feature that a via has to match; this can be one of the following:

  • Capping
  • Covering
  • Filling
  • Plugging
  • Tenting

Example Usage

Not HasViaFeature('Capping')
HasViaFeature('Capping') = False
HasViaFeature('Capping') = 'False'

Returns all objects except the via object whose via feature property is Capping.

HasViaFeature('Covering')
HasViaFeature('Covering') = True
HasViaFeature('Covering') = 'True'

Returns the via object whose via feature property is Covering.

Note

The single quote characters (') at the start and end of the ViaFeature string are mandatory.

Summary

Returns all via objects whose via type property complies with the Query.

Syntax

HasViaType(ViaType : String) : Boolean/Boolean_String

The ViaType string specifies the IPC 4761 Via Type property that a via has to match; this can be one of the following:

  • None
  • Type 1a
  • Type 1b
  • Type 2a
  • Type 2b
  • Type 3a
  • Type 3b
  • Type 4a
  • Type 4b
  • Type 5
  • Type 6a
  • Type 6b
  • Type 7

Example Usage

Not HasViaFeature('Capping')
HasViaFeature('Capping') = False
HasViaFeature('Capping') = 'False'

Returns all objects except the via object whose via feature property is Capping.

HasViaFeature('Covering')
HasViaFeature('Covering') = True
HasViaFeature('Covering') = 'True'

Returns the via object whose via feature property is Covering.

Note

The single quote characters (') at the start and end of the ViaFeature string are mandatory.

Summary

Returns all objects associated with component objects that are members of the specified Design Channel Class.

Syntax

InChannelClass(ClassName1 : String,ClassName2 : String,...,ClassNamen : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined design channel classes, by name, is presented.

Example Usage

InChannelClass('Red_LED')
InChannelClass('
Red_LED') = True
InChannelClass('
Red_LED') = 'True'
Returns all objects associated with component objects that are members of the Red_LED Design Channel Class.

InChannelClass('Output channel','Input channel')
InChannelClass('Output channel','Input channel') = True
InChannelClass('Output channel','Input channel') = 'True'

Returns all objects associated with component objects that are members of either the Output channel or Input channel Design Channel Classes.

InChannelClass('Input*')
InChannelClass('Input*') = True
InChannelClass('Input*') = 'True'

Returns all objects associated with component objects that are members of any Design Channel Class whose Name property starts with Input.

Notes

  • The single quote characters (') at the start and end of each ClassName string are mandatory.
  • The parent component objects are also returned.

Summary

Returns all component objects whose Name property complies with the Query.

Syntax

InComponent(Name : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing components, by name, is presented.

Example Usage

InComponent('U1')
InComponent('U1') = True
InComponent('U1') = 'True'

Returns all component objects whose Name property is U1.

InComponent('U1', 'U2', 'J1')
InComponent('U1', 'U2', 'J1') = True
InComponent('U1', 'U2', 'J1') = 'True'

Returns all component objects whose Name property is U1, or U2, or J1.

Not InComponent('IDC16')
InComponent('IDC16') = False
InComponent('IDC16') = 'False'

Returns all objects except component objects whose Name property is IDC16.

InComponent('U*')
InComponent('U*') = True
InComponent('U*') = 'True'

Returns all component objects whose Name property starts with U.

Notes

  • The single quote characters (') at the start and end of the Name string are mandatory.
  • For each returned component object, its associated child objects are also returned.

Summary

Returns all component objects that are members of the specified Component Class.

Syntax

InComponentClass(ClassName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined component classes, by name, is presented.

Example Usage

InComponentClass('TopSideSMD')
InComponentClass('TopSideSMD') = True
InComponentClass('TopSideSMD') = 'True'

Returns all component objects that are members of the TopSideSMD Component Class.

Not InComponentClass('BottomSideSMD')
InComponentClass('BottomSideSMD') = False
InComponentClass('BottomSideSMD') = 'False'

Returns all objects except component objects that are members of the BottomSideSMD Component Class.

Notes

The single quote characters (') at the start and end of the ClassName string are mandatory.

Summary

Returns all objects associated with differential pair objects whose Name property complies with the Query.

Syntax

InDifferentialPair(DifferentialPairName1 : String,DifferentialPair2 : String,...,DifferentialPairn : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing differential pairs, by name, is presented.

Example Usage

InDifferentialPair('Red_LED')
InDifferentialPair('
Red_LED') = True
InDifferentialPair('
Red_LED') = 'True'
Returns all objects associated with the differential pair object whose Name property is Red_LED.

InDifferentialPair('D0','D1')
InDifferentialPair('D0','D1') = True
InDifferentialPair('D0','D1') = 'True'
Returns all objects associated with differential pair objects whose Name property is either D0 or D1.

InDifferentialPair('Input*')
InDifferentialPair('Input*') = True
InDifferentialPair('Input*') = 'True'
Returns all objects associated with differential pair objects whose Name property starts with Input.

Notes

  • The single quote characters (') at the start and end of each DifferentialPairName string are mandatory.
  • The parent differential pair objects are also returned.

Summary

Returns all differential pair objects that are members of the specified Differential Pair Class.

Syntax

InDifferentialPairClass(ClassName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing differential pairs, by name, is presented.

Example Usage

InDifferentialPairClass('TopSide')
InDifferentialPairClass('TopSide') = True
InDifferentialPairClass('TopSide') = 'True'

Returns all differential pair objects that are members of the TopSide Differential Pair Class.

Not InDifferentialPairClass('BottomSide')
InDifferentialPairClass('BottomSide') = False
InDifferentialPairClass('BottomSide') = 'False'

Returns all objects except differential pair objects that are members of the BottomSide Differential Pair Class.

Notes

The single quote characters (') at the start and end of the ClassName string are mandatory.

Summary

Returns all via objects whose Drill Pair property matches the specified Drill Layer Pair.

Syntax

InDrillLayerPair(LayerPair : String) : Boolean/Boolean_String

Example Usage

InDrillLayerPair('Top Layer - Bottom Layer')
InDrillLayerPair('Top Layer - Bottom Layer') = True
InDrillLayerPair('Top Layer - Bottom Layer') = 'True'

Returns all via objects whose Drill Pair property matches the Top Layer - Bottom Layer Drill Layer Pair.

Not InDrillLayerPair('Top Layer - Signal Layer 1')
InDrillLayerPair('Top Layer - Signal Layer 1') = False
InDrillLayerPair('Top Layer - Signal Layer 1') = 'False'

Returns all objects except via objects whose Drill Pair property matches the Top Layer - Signal Layer 1 Drill Layer Pair.

Notes

  • The Drill Layer Pair property is only defined for via objects.
  • The single quote characters (') at the start and end of the LayerPair string are mandatory.
  • To target a specific type of via, include a suitable object-type check in the query: IsThruVia, IsBlindVia, IsBuriedVia, IsMicroVia, or IsSkipVia.
    For example, the query:
    InDrillLayerPair('Top Layer - Signal Layer 1') AND IsMicroVia 
    Returns all via objects whose Drill Pair property matches the Top Layer - Signal Layer 1 Drill Layer Pair AND whose via type is µVia.

Summary

Returns all objects associated with a from-to object whose Net , From Pad, and To Pad properties comply with the Query.

While from-to objects will be returned in the PCB List panel, in order to see these in the workspace, you will need to apply the filter query after placing the PCB panel into From-To Editor mode.

Syntax

InFromTo('Net_Name (From_Pad : To_Pad)') : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing from-tos, by name, is presented.

Net_Name, From_Pad, and To_Pad are all strings; the only single quote characters (') used are those depicted above (immediately within the outermost pair of brackets).

Each of the From_Pad and To_Pad strings specifies the full name that a pad has to match; this consists of an initial substring which specifies the Name property of the pad's parent component (i.e. the component's Designator), followed by a substring that specifies the pad's own Name property (i.e. the pad's Designator). The format will therefore be 'ParentComponentDesignator-PadDesignator'.

Example Usage

InFromTo('VDD_XTAL (C13-2 : U1-8)')
InFromTo('VDD_XTAL (C13-2 : U1-8)') = True
InFromTo('VDD_XTAL (C13-2 : U1-8)') = 'True'

Returns all objects associated with a from-to object  whose Net property is VDD_XTAL, From Pad property is C13-2, and To Pad property is U1-8. (As such, the From Pad has a Name property of 2, and its parent component object has a Name property of C13. Similarly, the To Pad has a Name property of 8, and its parent component object has a Name property of U1).

Notes

The parent from-to objects are also returned.

Summary

Returns all from-to objects that are members of the specified From To Class.

Syntax

InFromToClass(ClassName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined from to classes, by name, is presented.

Example Usage

InFromToClass('Bus Terminators')
InFromToClass('Bus Terminators') = True
InFromToClass('Bus Terminators') = 'True'

Returns all from-to objects that are members of the Bus Terminators From To Class.

Not InFromToClass('Bus Terminators')
InFromToClass('Bus Terminators') = False
InFromToClass('Bus Terminators') = 'False'

Returns all objects except from-to objects that are members of the Bus Terminators From To Class.

Notes

The single quote characters (') at the start and end of the ClassName string are mandatory.

Summary

Returns all objects whose Layer property matches a layer that is a member of the specified Layer Class.

Syntax

InLayerClass(ClassName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined layer classes, by name, is presented.

Example Usage

InLayerClass('TopSide')
InLayerClass('TopSide') = True
InLayerClass('TopSide') = 'True'

Returns all objects whose Layer property matches a layer that is a member of the TopSide Layer Class.

Not InLayerClass('BottomSide')
InLayerClass('BottomSide') = False
InLayerClass('BottomSide') = 'False'

Returns all objects except objects whose Layer property matches a layer that is a member of the BottomSide Layer Class.

Notes

The single quote characters (') at the start and end of the ClassName string is mandatory.

Summary

Returns all objects whose reference point is within the named Board Region.

Syntax

InLayerStackRegion(RegionName1 : String,RegionName2 : String,...,RegionNamen : String) : Boolean/Boolean_String

Example Usage

InLayerStackRegion('Region1')
InLayerStackRegion('Region1') = True
InLayerStackRegion('Region1') = 'True'

Returns all objects whose reference point is within the Board Region whose Name property is Region1.

InLayerStackRegion('Region1','Region2')
InLayerStackRegion('Region1','Region2') = True
InLayerStackRegion('Region1','Region2') = 'True'

Returns all objects whose reference point is within the Board Region whose Name property is Region1, or the Board Region whose Name property is Region2.

Not InLayerStackRegion('Region2')
InLayerStackRegion('Region2') = False
InLayerStackRegion('Region2') = 'False'

Returns all objects except objects whose reference point is within the Board Region whose Name property is Region2.

Notes

The single quote characters (') at the start and end of the RegionName string are mandatory.

Summary

Returns all primitive objects that are children of the specified polygon pour.

Syntax

InNamedPolygon(PolygonName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing polygon pours, by name, is presented.

Example Usage

InNamedPolygon('Power3V3')
InNamedPolygon('Power3V3') = True
InNamedPolygon('Power3V3') = 'True'

Returns all primitive objects that are children of the polygon pour whose Name property is Power3V3.

Not InNamedPolygon('Power3V3')
InNamedPolygon('Power3V3') = False
InNamedPolygon('Power3V3') = 'False'

Returns all objects except primitive objects that are children of the polygon pour whose Name property is Power3V3.

Notes

  • The single quote characters (') at the start and end of the PolygonName string are mandatory.
  • The parent polygon pour object is also returned.

Summary

Returns all objects (parent and children) that are part of the specified union.

Syntax

InNamedUnion(UnionName : String) : Boolean/Boolean_String

Union names are automatically assigned, but can be renamed through using the PCB panel in Unions mode. As you define the Query expression, a pop-up list of all existing unions, by name, is presented.

Example Usage

InNamedUnion('Unions')
InNamedUnion('Unions') = True
InNamedUnion('Unions') = 'True'

Returns all objects (parent and children) that are part of the union whose name is Unions.

Not InNamedUnion('Unions 1')
InNamedUnion('Unions 1') = False
InNamedUnion('Unions 1') = 'False'

Returns all objects except objects (parent and children) that are part of the union whose name is Unions 1.

Notes

The single quote characters (') at the start and end of the UnionName string are mandatory.

Summary

Returns all objects associated with Net objects whose Name property complies with the Query.

Syntax

InNet(NetName1 : String,NetName2 : String,...,NetNamen : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing nets, by name, is presented.

Example Usage

InNet('Red_LED')
InNet('
Red_LED') = True
InNet('
Red_LED') = 'True'
Returns all objects associated with the Net object whose Name property is Red_LED.

InNet('D0','D1')
InNet('D0','D1') = True
InNet('D0','D1') = 'True'
Returns all objects associated with Net objects whose Name property is either D0 or D1.

InNet('V*')
InNet('V*') = True
InNet('V*') = 'True'
Returns all objects associated with Net objects whose Name property starts with V.

Notes

  • The single quote characters (') at the start and end of each NetName string are mandatory.
  • The parent Net objects are also returned.

Summary

Returns all nets (and their associated objects) that are members of the specified Net Class.

Syntax

InNetClass(ClassName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined net classes, by name, is presented.

Example Usage

InNetClass('Data Bus Nets')
InNetClass('Data Bus Nets') = True
InNetClass('Data Bus Nets') = 'True'

Returns all nets (and their associated objects) that are members of the Data Bus Nets Net Class.

Not InNetClass('Address Bus Nets')
InNetClass('Address Bus Nets') = False
InNetClass('Address Bus Nets') = 'False'

Returns all objects except nets (and their associated objects) that are members of the Address Bus Nets Net Class.

Notes

The single quote characters (') at the start and end of the ClassName string are mandatory.

Summary

Returns all pad objects that are members of the specified Pad Class.

Syntax

InPadClass(ClassName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined pad classes, by name, is presented.

Example Usage

InPadClass('Top Side Probe Pads')
InPadClass('Top Side Probe Pads') = True
InPadClass('Top Side Probe Pads') = 'True'

Returns all pad objects that are members of the Top Side Probe Pads Pad Class.

Not InPadClass('Bottom Side Probe Pads')
InPadClass('Bottom Side Probe Pads') = False
InPadClass('Bottom Side Probe Pads') = 'False'

Returns all objects except pad objects that are members of the Bottom Side Probe Pads Pad Class.

Notes

The single quote characters (') at the start and end of the ClassName string are mandatory.

Summary

Returns all polygon pour objects that are members of the specified Polygon Class.

Syntax

InPolygonClass(ClassName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined polygon classes, by name, is presented.

Example Usage

InPolygonClass('Top Side Polys')
InPolygonClass('Top Side Polys') = True
InPolygonClass('Top Side Polys') = 'True'

Returns all polygon pour objects that are members of the Top Side Polys Polygon Class.

Not InPolygonClass('Custom Polys')
InPolygonClass('Custom Polys') = False
InPolygonClass('Custom Polys') = 'False'

Returns all objects except polygon pour objects that are members of the Custom Polys Polygon Class.

Notes

The single quote characters (') at the start and end of the ClassName string are mandatory.

Summary

Returns all objects that reside within the area specified by the Query.

Syntax

InRegion(X1 : Number ,Y1 : Number ,X2 : Number ,Y2 : Number) : Boolean/Boolean_String

X1,Y1 and X2,Y2 specify coordinates in the PCB (Library) file. The left and right boundaries of the region are specified by the X1 and X2 parameters, while the lower and upper boundaries of the region are specified by the Y1 and Y2 parameters.

All coordinates are referenced to the absolute origin (and not to the user origin or component insertion point), and at present, all coordinates always use units of mils. (1 mil = 0.001 inch).

Example Usage

InRegion(12700,4700,13300,5000)
InRegion(12700,4700,13300,5000) = True
InRegion(12700,4700,13300,5000) = 'True'

Returns objects residing within the rectangular region bounded by X1 = 12700 and X2 = 13300, and by Y1 = 4700 and Y2 = 5000; those coordinates are referenced to the absolute origin.

Notes

  • Parent component, coordinate, dimension, and Net objects are not returned.
  • This keyword is an alias for the InRegionAbsolute keyword.

Summary

Returns all objects that reside within the area specified by the Query.

Syntax

InRegionAbsolute(X1 : Number ,Y1 : Number ,X2 : Number ,Y2 : Number) : Boolean/Boolean_String

X1,Y1 and X2,Y2 specify coordinates in the PCB (Library) file. The left and right boundaries of the region are specified by the X1 and X2 parameters, while the lower and upper boundaries of the region are specified by the Y1 and Y2 parameters.

All coordinates are referenced to the absolute origin (and not to the user origin or component insertion point), and at present, all coordinates always use units of mils. (1 mil = 0.001 inch).

Example Usage

InRegionAbsolute(12700,4700,13300,5000)
InRegionAbsolute(12700,4700,13300,5000) = True
InRegionAbsolute(12700,4700,13300,5000) = 'True'

Returns objects residing within the rectangular region bounded by X1 = 12700 and X2 = 13300, and by Y1 = 4700 and Y2 = 5000; those coordinates are referenced to the absolute origin.

Notes

  • Parent component, coordinate, dimension, and Net objects are not returned.
  • This keyword is an alias for the InRegion keyword.

Summary

Returns all objects that reside within the area specified by the Query.

Syntax

InRegionRelative(X1 : Number ,Y1 : Number ,X2 : Number ,Y2 : Number) : Boolean/Boolean_String

X1,Y1 and X2,Y2 specify coordinates in the PCB (Library) file. The left and right boundaries of the region are specified by the X1 and X2 parameters, while the lower and upper boundaries of the region are specified by the Y1 and Y2 parameters.

All coordinates are referenced to the user origin (PCB files) or component insertion point (PCB Library files), rather than to the absolute origin, and at present, all coordinates always use units of mils. (1 mil = 0.001 inch).

Example Usage

InRegionRelative(-700,-400,1300,1600)
InRegionRelative(-700,-400,1300,1600) = True
InRegionRelative(-700,-400,1300,1600) = 'True'

Returns objects residing within the rectangular region bounded by X1 = -700 and X2 = 1300, and by Y1 = -400 and Y2 = 1600; those coordinates are referenced to the user origin (or component insertion point).

Notes

  • Parent component, coordinate, dimension, and Net objects are not returned.

Summary

Returns all parent and child objects of the Component Classes and Net Classes, that are members of the specified Structure Class.

Syntax

InStructureClass(ClassName1 : String,ClassName2 : String,...,ClassNamen : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined structure classes, by name, is presented.

Example Usage

InStructureClass('Red_LED')
InStructureClass('
Red_LED') = True
InStructureClass('
Red_LED') = 'True'
Returns all parent and child objects of the Component Classes and Net Classes, that are members of the Red_LED Structure Class.

InStructureClass('Output channel','Input channel')
In
StructureClass('Output channel','Input channel') = True
In
StructureClass('Output channel','Input channel') = 'True'
Returns all parent and child objects of the Component Classes and Net Classes, that are members of either the Output channel or Input channel Structurel Classes.

InStructureClass('Input*')
In
StructureClass('Input*') = True
In
StructureClass('Input*') = 'True'
Returns all parent and child objects of the Component Classes and Net Classes, that are members of any Structure Class whose Name property starts with Input.

Notes

  • The single quote characters (') at the start and end of each ClassName string are mandatory.

Summary

Returns all objects (parent and children) that are part of the specified union.

Syntax

InUnion(Union : Number) : Boolean/Boolean_String

Union numbers are automatically assigned. As you define the Query expression, a pop-up list of all existing unions, by number, is presented.

Example Usage

InUnion(1)
InUnion(1) = True
InUnion(1) = 'True'

Returns all objects (parent and children) that are part of the union whose assigned number is 1.

Not InUnion(4)
InUnion(4) = False
InUnion(4) = 'False'

Returns all objects except objects (parent and children) that are part of the union whose assigned number is 4.

Summary

Returns all objects that are associated with the specified xSignal.

Syntax

InxSignal(Name : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing xSignals, by name, is presented.

Example Usage

InxSignal('DRAM_A0_PP1')
InxSignal('DRAM_A0_PP1') = True
InxSignal('DRAM_A0_PP1') = 'True'

Returns all objects that are associated with the xSignal DRAM_A0_PP1.

Not InxSignal('DRAM_A0_PP1')
InxSignal('DRAM_A0_PP1') = False
InxSignal('DRAM_A0_PP1') = 'False'

Returns all objects except objects that are associated with the xSignal DRAM_A0_PP1.

Notes

  • The single quote characters (') at the start and end of the Name string are mandatory.

Summary

Returns all xSignal objects that are members of the specified xSignal Class.

Syntax

InxSignalClass(ClassName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing user-defined xSignal classes, by name, is presented.

Example Usage

InxSignalClass('PCIE')
InxSignalClass('PCIE') = True
InxSignalClass('PCIE') = 'True'

Returns all xSignal objects that are members of the PCIE xSignal Class.

Not InxSignalClass('PCIE')
InxSignalClass('PCIE') = False
InxSignalClass('PCIE') = 'False'

Returns all objects except xSignal objects that are members of the PCIE xSignal Class.

Notes

  • The single quote characters (') at the start and end of the ClassName string are mandatory.

Summary

Returns the specified polygon pour.

Syntax

IsNamedPolygon(PolygonName : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing polygon pours, by name, is presented.

Example Usage

IsNamedPolygon('Power3V3')
IsNamedPolygon('Power3V3') = True
IsNamedPolygon('Power3V3') = 'True'

Returns the polygon pour object whose Name property is Power3V3.

Not IsNamedPolygon('Power3V3')
IsNamedPolygon('Power3V3') = False
IsNamedPolygon('Power3V3') = 'False'

Returns all objects except the polygon pour object whose Name property is Power3V3.

Notes

  • The single quote characters (') at the start and end of the PolygonName string are mandatory.
  • The child primitive objects of the returned polgon pour object are not returned.

Summary

Returns the xSignal object with the specified name.

Syntax

IsxSignal(Name : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing xSignals, by name, is presented.

Example Usage

IsxSignal('DRAM_A0_PP1')
IsxSignal('DRAM_A0_PP1') = True
IsxSignal('DRAM_A0_PP1') = 'True'

Returns the xSignal DRAM_A0_PP1.

Not IsxSignal('DRAM_A0_PP1')
IsxSignal('DRAM_A0_PP1') = False
IsxSignal('DRAM_A0_PP1') = 'False'

Returns all objects except the xSignal DRAM_A0_PP1.

Notes

The single quote characters (') at the start and end of the Name string are mandatory.

Summary

Returns all objects whose X1 and Y1 properties comply with the Query.

Syntax

OnGrid(X1 : Number,Y1 : Number) : Boolean/Boolean_String

Each instance of Distance_String is a numerical string that specifies a distance in the PCB (Library) file. To be returned, an object's X1 property has to be an integral multiple of the first distance specified, and its Y1 property has to be an integral multiple of the second distance specified.

X1 and Y1 specify coordinates in the PCB (Library) file. To be returned, an object's X1 property has to be an integral multiple of the first value specified, and its Y1 property has to be an integral multiple of the second value specified.

All coordinates are referenced to the absolute origin (and not to the user origin or component insertion point), and at present, all coordinates always use units of mils. (1 mil = 0.001 inch).

Example Usage

OnGrid(25,25)
OnGrid(25,25) = True
OnGrid(25,25) = 'True'

Returns all objects whose X1 property is an integral multiple of 25mil and whose Y1 property is an integral multiple of 25mil.

OnGrid(5,100)
OnGrid(5,100) = True
OnGrid(5,100) = 'True'

Returns all objects whose X1 property is an integral multiple of 5mil and whose Y1 property is an integral multiple of 100mil.

Summary

Returns all objects whose Layer property complies with the Query.

Syntax

OnLayer(Layer : String) : Boolean/Boolean_String

Layer is the name of the layer as it appears on the Layers & Colors tab of the View Configuration panel.

Example Usage

OnLayer('Top Layer')
OnLayer('Top Layer') = True
OnLayer('Top Layer') = 'True'

Returns all objects whose Layer property is Top Layer.

Not OnLayer('Mechanical 3')
OnLayer('Mechanical 3') = False
OnLayer('Mechanical 3') = 'False'

Returns all objects except objects whose Layer property is Mechanical 3 layer.

Notes

  • The single quote characters (') at the start and end of Layer are mandatory.
  • Note that objects placed on the Multi-Layer layer will be returned by the OnLayer query keyword only when specifying this particular layer, i.e. when using the OnLayer('Multi-Layer') query. Objects placed on the Multi-Layer layer will not be returned by the OnLayer query keyword when specifying another layer on which the shapes of these objects exist. Use the ExistsOnLayer(Layer : String) query to target objects (including objects on the Multi-Layer layer) that have shapes on the specified layer.

Summary

Returns objects that either totally or partially reside within the region occupied by any room object (confinement constraint rule) whose Name property complies with the Query.

Syntax

TouchesRoom(RoomName1 : String,RoomName2 : String,...,RoomNamen : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing rooms, by name, is presented.

Example Usage

TouchesRoom('Power')
TouchesRoom('Power') = True
TouchesRoom('Power') = 'True'

Returns objects that either totally or partially reside within the region occupied by any Room whose Name property is Power.

TouchesRoom('COUT1','COUT2')
TouchesRoom('COUT1','COUT2') = True
TouchesRoom('COUT1','COUT2') = 'True'

Returns objects that either totally or partially reside within the regions occupied by any Rooms whose Name property is either COUT1 or COUT2.

TouchesRoom('Monitor','Auxilary','Effects')
TouchesRoom('Monitor','Auxilary','Effects') = True
TouchesRoom('Monitor','Auxilary','Effects') = 'True'

Returns objects that either totally or partially reside within the regions occupied by any Rooms whose Name property is Monitor, or Auxilary, or Effects.

Notes

  • The single quote characters (') at the start and end of each RoomName string are mandatory.
  • Parent coordinate, dimension, and Net objects are not returned.

Summary

Returns objects that totally reside within the region occupied by any room object (confinement constraint rule) whose Name property complies with the Query.

For pads and vias to be returned, their center points must reside within the specified room(s).

Syntax

WithinRoom(RoomName1 : String,RoomName2 : String,...,RoomNamen : String) : Boolean/Boolean_String

As you define the Query expression, a pop-up list of all existing rooms, by name, is presented.

Example Usage

WithinRoom('Power')
WithinRoom('Power') = True
WithinRoom('Power') = 'True'
Returns objects that totally reside within the region occupied by any Room whose Name property is Power.

WithinRoom('COUT1','COUT2')
WithinRoom('COUT1','COUT2') = True
WithinRoom('COUT1','COUT2') = 'True'
Returns objects that totally reside within the regions occupied by any Rooms whose Name property is either COUT1 or COUT2.

WithinRoom('Monitor','Auxilary','Effects')
WithinRoom('Monitor','Auxilary','Effects') = True
WithinRoom('Monitor','Auxilary','Effects') = 'True'
Returns objects that totally reside within the regions occupied by any Rooms whose Name property is Monitor, or Auxilary, or Effects.

Notes

  • The single quote characters (') at the start and end of each RoomName string are mandatory.
  • Parent coordinate, dimension, and Net objects are not returned.
Found an issue with this document? Highlight the area, then use Ctrl+Enter to report it.

Contact Us

Contact our corporate or local offices directly.

We're sorry to hear the article wasn't helpful to you.
Could you take a moment to tell us why?
200 characters remaining
You are reporting an issue with the following selected text
and/or image within the active document: