3.7 KiB
Expression functions
All function parameters support simple wildcards (* and ?).
A.enclosedByArea('<zone_name>')
True if all of
Alies within the given zone's outline.
NB: this is potentially a more expensive call than
intersectsArea(). UseintersectsArea()where possible.
A.existsOnLayer('<layer_name>')
True if
Aexists on the given layer. The layer name can be either the name assigned in Board Setup > Board Editor Layers or the canonical name (ie:F.Cu).
NB: this returns true if
Ais on the given layer, independently of whether or not the rule is being evaluated for that layer. For the latter use a(layer "layer_name")clause in the rule.
A.fromTo('x', 'y')
True if the object exists on the copper path between the given pads.
xandyare the full names of pads in the design, such asR1-Pad1.
A.getField('<field_name>')
The value of the given field. Only footprints have fields, so a field is only returned if
Ais a footprint.
A.hasComponentClass('<component_class_name>')
True if the set of component classes assigned to
Acontains the named component class.
A.hasNetclass('<netclass_name>')
True if
Ahas had the given netclass assigned to it, either by an explicit netclass label or through a pattern match assignment.
A.inDiffPair('<net_name>')
True if
Ahas a net that is part of the specified differential pair.<net_name>is the base name of the differential pair. For example,inDiffPair('/CLK')matches items in the/CLK_Pand/CLK_Nnets.
A.intersectsArea('<zone_name>')
True if any part of
Alies within the given zone's outline.
A.intersectsCourtyard('<footprint_identifier>')
True if any part of
Alies within the given footprint's principal courtyard.
A.intersectsFrontCourtyard('<footprint_identifier>')
True if any part of
Alies within the given footprint's front courtyard.
A.intersectsBackCourtyard('<footprint_identifier>')
True if any part of
Alies within the given footprint's back courtyard.
The
footprint_identifierlisted above can be one of the following:
- A reference designator, possibly containing wildcards
*and?- A footprint library identifier such as
LibName:FootprintName. In this case, the library identifier must contain the:character to separate the library name from the footprint name, and either name may contain wildcards.- A component class, in the form
${Class:ClassName}. The keywordClassis not case-sensitive, but component class names are case-sensitive.
AB.isCoupledDiffPair()
True if
AandBare members of the same diff pair.
A.isMicroVia()
True if
Ais a microvia.
A.isBlindVia()
True if
Ais a blind via.
A.isBuriedVia()
True if
Ais a buried via.
A.isPlated()
True if
Ahas a hole which is plated.
A.memberOfGroup('<group_name>')
True if
Ais a member of the given group The name can contain wildcards. Includes nested membership.
A.memberOfFootprint('<footprint_identifier>')
True if
Ais a member of a given footprint (for example, a pad or graphic shape defined inside that footprint). The various ways of specifyingfootprint_identifierare described above.
A.memberOfSheet('<sheet_path>')
True if
Ais a member of the given schematic sheet. The sheet path can contain wildcards.
A.memberOfSheetOrChildren('<sheet_path>')
True if
Ais a member of the given schematic sheet, or any of its child hierarchical sheets. The sheet path can contain wildcards.