Hangman,
In the Visual LISP IDE Help Documentation, have a read of the following sections:
+ Using the AutoLISP Language
|
+--+ Using AutoLISP to Manipulate AutoCAD Objects
|
+--+ Selection Set Handling
|
+--+ Selection Set Filter Lists
|
+--> Relational Tests
|
+--> Logical Grouping of Filter Tests