Contact Us
Contact our corporate or local offices directly.
Parent page: Query Language Reference
This page provides a summary of the operators that can be used when defining logical query expressions with the Query Language.
Operator | Description | Example |
---|---|---|
+ | Addition operator | NetPinCount + NetViaCount |
- | Subtraction operator | ArcStopAngle - ArcStartAngle |
* | Multiplication operator | PadXSize_BottomLayer * PadYSize_BottomLayer |
/ | Division operator | HoleDiameter / ViaDiameter |
Div | Integral division operator | Color Div 65536 This calculates Color divided by 65536 and the fractional part of the result is discarded |
Mod | Modulus operator | Color Mod 256 This calculates the remainder when Color is divided by 256, without determining the fractional part of the result |
Operator | Description | Example |
---|---|---|
And | Logical AND operator | IsPad And OnMultiLayer To be returned, an object has to be a pad, and reside on the Multi-Layer layer |
&& | Logical AND operator (lower precedence) |
IsPad && OnMultiLayer To be returned, an object has to be a pad, and reside on the Multi-Layer layer |
Or | Logical OR operator | IsPad Or IsVia To be returned, an object has to either be a pad, or a via |
|| | Logical OR operator (lower precedence) |
IsPad || IsVia To be returned, an object has to either be a pad, or a via |
Xor | Logical EXCLUSIVE OR operator | OnMultiLayer Xor (HoleDiameter <> 0) To be returned, an object has to either be on the Multi-Layer layer and have a Hole Diameter that is zero, or not be on the Multi-Layer layer and have a Hole Diameter that is not zero. |
Not | Logical NOT operator | Not OnMultiLayer To be returned, an object has to not be on the Multi-Layer layer |
Operator | Description | Example |
---|---|---|
< | Less Than operator | HoleDiameter < 40 To be returned, an object has to have a Hole Diameter which is less than 40 |
<= | Less Than Or Equal To operator | HoleDiameter <= 40 To be returned, an object has to have a Hole Diameter which is less than, or equal to 40 |
>= | Greater Than Or Equal To operator | HoleDiameter >= 40 To be returned, an object has to have a Hole Diameter which is greater than, or equal to 40 |
> | Greater Than operator | HoleDiameter > 40 To be returned, an object has to have a Hole Diameter which is greater than 40 |
<> | Not Equal To operator | HoleDiameter <> 40 To be returned, an object has to have a Hole Diameter which is not equal to 40 |
= | Equal To operator | HoleDiameter = 40 To be returned, an object has to have a Hole Diameter which is equal to 40 |
Between...And... | Inclusive range operator | HoleDiameter Between 30 And 50 To be returned, an object has to have a Hole Diameter that is greater than, or equal to 30, and less than, or equal to 50. |
Like | Like operator | Name Like 'ADDR?*' This returns objects having a Name property whose associated (text) string begins with ADDR and which contains at least one more character |
Wild Card characters permit the provision of strings which are not exactly specified. These characters are typically used in conjunction with other characters, resulting in the provision of strings which are partially specified. A few exceptional keywords can accept string parameters that are not exactly specified, but for the most part, strings can only contain Wild Card characters when these are being compared by the Like operator.
Operator | Description | Example |
---|---|---|
? | This can be replaced by a single character of any type | Footprint Like 'DIP1?' This returns objects which have a Footprint property of DIP10, or DIP12, or DIP14, etc. |
* | This can be replaced by any number of characters, each of which can be of any type | Footprint Like 'SIP*' This returns objects which have a Footprint property of SIP1, or SIP12, or SIP216, etc. (Any objects having a Footprint property of SIP are also returned, because '*' can also be replaced by no characters) |
Operator | Description | Example |
---|---|---|
True | This affirms the meaning of a Keyword | IsPad = True To be returned, an object has to be a pad |
False | This negates the meaning of a Keyword | IsVia = False To be returned, an object has to not be a via |
It is worthwhile taking a look at the order of precedence in place for the operators used in logical Query expressions. After all, without such knowledge, an expression may not target the objects required.
Brackets have the highest precedence within an order of precedence that has been defined for the various operators, and which determines how queries are interpreted by the software (whenever the user has not provided brackets). The sequence of this order, from highest to lowest, is as follows:
Contact our corporate or local offices directly.
If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited
If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited
Got it. You actually don’t need an evaluation license for that.
Click the button below to download the latest Altium Designer installer.
If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited
Please fill out the form below to get a quote for a new seat of Altium Designer.
By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.
If you are on Altium Subscription, you don’t need an evaluation license.
If you are not an active Altium Subscription member, please fill out the form below to get your free trial.
By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.
If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited
You came to the right place! Please fill out the form below to get your free trial started.
By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.
Great News!
Valid students can get their very own 6-month Altium Designer Student License for FREE! Just fill out the form below to request your Student License today.
By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.
Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.
Please fill out the form below to request one.
By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.
That’s great! Making things is awesome. We have the perfect program for you.
Upverter is a free community-driven platform designed specifically to meet the needs of makers like you.
Click here to give it a try!
If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited
Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.
Please fill out the form below to request one.
By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.