×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

selecting all on a layer?

selecting all on a layer?

selecting all on a layer?

(OP)
Anyone know how I can select everything on one layer by clicking an object on that specific layer?  This would be better than freezing everything else and then un-freezing once the selections have been made..
Thanks!

RE: selecting all on a layer?

Box around what you want and then right click, there is an option called quick select, within that is layer.

RE: selecting all on a layer?

(OP)
cool!  i didnt have that in my right click menu, but the commandline prompt works...thanks!

RE: selecting all on a layer?

Another method:
Type your command
Type (SSX)
Hit ENTER
Type LA
Hit ENTER
Type the layer name
Hit Enter

RE: selecting all on a layer?

Dear cride,
The following lisp command is what you need. Just copy and paste it into AutoCAD command prompt and select one object.

(sssetfirst nil (ssget "x" (list (assoc 8 (entget (car (entsel)))))))

You can assign it to a toolbutton.
:)
Farzad

RE: selecting all on a layer?

(OP)
FH-
how do i assign this to a tool button?  I dont usually work in LISP...
thanks!

RE: selecting all on a layer?

Dear cride,
1- Create a text file using notepad and enter the following code into it:
(defun ABC()
   (sssetfirst nil (ssget "x" (list (assoc 8 (entget (car (entsel)))))))
)
2- Save the file into the AutoCAD "Support folder" with the name "ABC.LSP"
3- Create a text file using notepad and enter the following code into it:  (If the file "ACADDOC.LSP" exists in the "Support" folder, append the below code to file and don't do step number 4)
(defun-q s::startup()
  (load "abc.lsp")
)
4- Save the file into the AutoCAD "Support folder" with the name "ACADDOC.LSP".
5- Run ACAD.
6- Right click on a toolbar and select the "Customize command from the menu.
7- In the "Customize dialog box activate the "Commands" tab and select the "User defined" item from the list.
8- From the right side drag and drop the "User Defined Button" to outside of dialog box (everywhere).
9- Right click on the new button and select the "Properties" from the menu.
10- In the Dialog box in lower large textbox enter (abc)
11- You can select an image for the button.
12- Click "Apply"
13- Click "OK"

:)
Farzad

RE: selecting all on a layer?

Isin't it easier to work with the quickselect program of AutoCad?

RE: selecting all on a layer?

Hi,

the solutions are great.

Here's annother (with the Express Tools):

isolate the layer "layiso"
-> edit whatever You want
-> restore the previous layerstate "_layerp"

Lothar

ADT 2004
ACAD 2002

RE: selecting all on a layer?

Here's another.
Set the layer in question to be the current layer.  Lock all the other layers.  I do a "Layer" "LOC" "ALL".  You can also do a "LAYER" " FREEZE" " ALL".  Use the "A" or "All" option to select all in whatever command you are using.  I use a set of macros for this:

LL = lock all layers (note: the current layer can not be locked)
LU = unlock all layers
LF = freeze all layers (note: the current layer can not be frozen)
LT = thaw all layers

RE: selecting all on a layer?

try the getsel (or 'getsel) command

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources