@cool.stuff
I can tell you are approaching the lisp language without certain tools.
Lisp is both archaic and super powerful at the same time, and you need some basic debugging skills.
You think you have a specific lisp issue, but you actually have a basics of lisp issue like we all did at some point.
Homework I hope you do as it will make things way less frustrating:
The first thing to know is the VLIDE built into autocad. Its the lisp editor/debugger (Visual Lisp IDE..).
Try running VLIDE and if it asks about the .net one, pick the bottom option and I think you have to reopen acad.
Once the VLIDE is open, open your lisp, and notice its color coded.
Now, double click before a parenthesis, it selects the code to the "end" parenthesis, no matter how far down.
Just that skill is critical as paren matching is critical in lisp.
Next, try selecting a statement like (setq myvar 12.0), right click, and pick Inspect. It spits the result into a little dialog, or shows an error, all right in place. You can even just select a var like myvar and inspect to see its current value.
You can also set a watch on a variable with the right click menu.
Next, try loading your code with Tools->Load Text in Editor.
Close the window that pops up, but read it to see if it gives an error.
That is a test of paren matching, and it loads your code so you can try things in cad.
Next, you can set a break point with F9, before an opening paren.
Then do Tools->load text in editor.
When you try your command in acad, it will start and then jump to the VLIDE and stop at the break point.
Use F8 to step through code and the debug toolbar to step over or out to stop.
You can inspect things while code is stopped.
With those skills you can answer most of the things you asked.
I will add that lisp is a language where you make lots of lists.
As you loop through a selection set, you may build a list of entity names you care about.
So making and accessing them with list, cons, append, nth, foreach, and so on are items you will need to know.
Its so easy once you see you can write a statement and inspect the result to test if you did it right.
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties