About Relational Tests in Filter Lists for Selection Sets (AutoLISP)

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: