Unless otherwise specified, an equivalency is implied for each item in the filter-list.
For numeric group codes (integers, reals, points, and vectors), you can specify other relations by including a special -4 group code that specifies a relational operator. The value of a -4 group code is a string indicating the test operator to be applied to the next group in the filter-list.
The following selects all circles with a radius (group code 40) greater than or equal to 2.0:
(ssget "X" '((0 . "CIRCLE") (-4 . ">=") (40 . 2.0)))
The possible relational operators are shown in the following table:
Relational operators for selection set filter lists |
|
---|---|
Operator |
Description |
"*" |
Anything goes (always true) |
"=" |
Equals |
"!=" |
Not equal to |
"/=" |
Not equal to |
"<>" |
Not equal to |
"<" |
Less than |
"<=" |
Less than or equal to |
">" |
Greater than |
">=" |
Greater than or equal to |
"&" |
Bitwise AND (integer groups only) |
"&=" |
Bitwise masked equals (integer groups only) |
The use of relational operators depends on the kind of group code value you are testing:
The bitwise AND, "&", is true if ((integer_group & filter) /= 0)—that is, if any of the bits set in the mask are also set in integer_group.
The bitwise masked equals, "&=", is true if ((integer_group & filter) = filter)—that is, if all bits set in the mask are also set in integer_group (other bits might be set in the integer_group but are not checked).