PDA

View Full Version : Select by Elevation?


cchiles
2005-10-05, 04:58 PM
Hello - Let me first say, I have dabbled a bit in writing lisp.
Does anyone have or can point me in the right direstion to a lisp that can select ALL objects at a given Z elevation? Either inputed or selected. I have searched and searched for a way to do this, but have come up with nothing.

Thanks,
Chris

Opie
2005-10-05, 05:03 PM
Have you tried using the filter command in AutoCAD? The filter command will allow you to set up the criteria for your selection set.

Or even the qselect command? I have not used the qselect command much and therefore do not have much experience with it.

cchiles
2005-10-05, 05:06 PM
Yea - I have - Qselect will only allow you to do it on a per entity basis & I couldn't find a way to have filter give me the elevation as selection criteria.

Chris

CAB2k
2005-10-05, 11:00 PM
Something along these lines might work.
(setq elev 144.0)

(setq ss (ssget "X"
(list '(-4 . "<OR")
(cons 38 elev)
'(-4 . "*,*,=")
(list 10 0.0 0.0 elev)
'(-4 . "*,*,=")
(list 11 0.0 0.0 elev)
'(-4 . "OR>")
)
)
)