Relational Tests

Unless otherwise specified, an equivalency is implied for each item in the filter-list. For numeric groups (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 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




Anything goes (always true)




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 you are testing: