Can someone let me know what a lisp routine would look like for selecting all items on layer 5.
Thanks.
Just a hint always search this NG for suggestions before posting. One way
(setq ss (ssget "x" (list (cons 8 "5"))))
Will give you a selection set of all objects on layer 5
(command "erase" ss "")
will erase all on layer 5
Southie
Or, since there's nothing to be evaluated [no variable names or calculations] in the (ssget) filter, you can use the shorter "quoted-list" version:
(ssget "X" '((8 . "5")))
Hello
If I remember well, this kind of ssget will select any entities on Layer "5"
in ANY space (Model + Layouts) ?
Bye, Pat
Patrice BRAUD
@braudpat wrote:....
If I remember well, this kind of ssget will select any entities on Layer "5"
in ANY space (Model + Layouts) ?
....
That is correct. Any things that are not in the current space cannot then be operated on by editing commands in (command) functions that ask for object selection, because those will "see" only things in the current space, but they can be operated on in other ways.
hi all, I know this thread is old but i'm having an issue with my lisping code and if anyone can help me, that would be great.
i'm trying to select and change all hatches AR-SAND on layer a-ceil-grid and then only change the scale. The issue is that if I have multiple hatches on this layer and this type, it will only work on the very first one i put in the file,
is there a way to select all?
here is my code:
(defun C:Hatch_Edit_A-CEIL-GRID (/ ss old_CMDECHO)
(setq old_CMDECHO (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
;;(setq ss (ssget "X" '((2 . "AR-SAND"))))
(setq ss (ssget "X" '((2 . "AR-SAND")(8 . "a-ceil-grid"))))
(command "-hatchedit" ss "p" "AR-SAND" "10" "")
(Setvar "CMDECHO" old_CMDECHO)
(princ)
)
all help is appreciated !
@Maltezc wrote:
....
i'm trying to select and change all hatches AR-SAND on layer a-ceil-grid and then only change the scale. The issue is that if I have multiple hatches on this layer and this type, it will only work on the very first one i put in the file,
is there a way to select all?
....
(command "-hatchedit" ....
The Hatchedit command won't work on more than one at a time [which you can tell by trying it manually], but it can be done by stepping through the selection set and having it change one at a time. But I would suggest you start a new thread [after first Searching for whether this has come up before], to make it easier for someone else who has the same problem to find whatever solution you may get -- this is not really a select-all-on-a-Layer problem to go with this thread's Subject, but a Hatch-editing problem. [EDIT -- And now I see that you have ....]