Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello everyone, i would like to make a lisp that can select all the elements of the current layer.
I have found the code to select a layer, but it has to pick an element. I would like to just select the current layer instantly.
This is code to select the elements of the desired Layer
(defun c:SALL ()
(setq TargEnt (car (entsel "\nSelect object on layer to select: ")))
(setq TargLayer (assoc 8 (entget TargEnt)))
(sssetfirst nil (ssget "_X" (list TargLayer)))
(princ "\n items selected")
)
This is the code to select that gives us the name of the current layer
(getvar "CLAYER")
What I don't know is how to put the two codes together.
Solved! Go to Solution.