Select all layer objects

Select all layer objects

GeryKnee
Advocate Advocate
655 Views
3 Replies
Message 1 of 4

Select all layer objects

GeryKnee
Advocate
Advocate

The following

 

(defun C:SelLayerObjects(/)
(setq LayName (getstring "Layername : "))
(ssget "X" '((8 . LayName)))
(princ)
)

 

must after execution leave a selextion of all object laying on layer Layname.

What is wrong and doesn't word??

0 Likes
Accepted solutions (1)
656 Views
3 Replies
Replies (3)
Message 2 of 4

pbejse
Mentor
Mentor
Accepted solution

@GeryKnee wrote:

The following

 

(defun C:SelLayerObjects(/)
(setq LayName (getstring "Layername : "))
(ssget "X" '((8 . LayName)))
(princ)
)

 

must after execution leave a selextion of all object laying on layer Layname.

What is wrong and doesn't word??


 

(defun C:SelLayerObjects (/)
  (setq LayName (getstring "Layername : "))
  (setq ss (ssget "X" (list ( cons 8  LayName))))
  (sssetfirst nil ss)
  (princ)
)

 

0 Likes
Message 3 of 4

andkal
Collaborator
Collaborator

In case you wanted to select more than just layer here is a plugin for it:
https://apps.autodesk.com/ACD/pl/Detail/Index?id=1074046707147556967&appLang=en&os=Win32_64

cheers


• www.autolisps.blogspot.com - Productivity plugins for Autocad and Autocad MEP
• Autodesk AppStore
0 Likes
Message 4 of 4

GeryKnee
Advocate
Advocate

Thank you very much,  andcal

Regards

Gery.

0 Likes