Freeze/thaw layers

Discussion in 'AutoCAD' started by km-aco, Jul 13, 2004.

  1. km-aco

    km-aco Guest

    I am looking for a lisp-routine that can freeze all layers, except for the layer on wich I have picked an object.

    I also need a routine that can thaw all layers at once.

    I dont know much about LISP, so please make it very easy for me, if it is possible.
     
    km-aco, Jul 13, 2004
    #1
  2. km-aco

    tstright Guest

    Express Tools has that....
     
    tstright, Jul 13, 2004
    #2
  3. Here's my pull-down menu for these kinds of things, with more options than
    Express Tools has:

    [->&Layers]
    [ON Layer(s)]'-LAYER ON \;
    [ON ALL Lyrs]'-LAYER ON * ;
    [OFF Layer(s)]'-LAYER OF
    [OFF All but]'-LAYER OF * N ;
    [OFF Lyr Pick]*^C^C^P-LAYER OF (cdr (assoc 8 (entget (car (entsel "Select
    Item on Layer to turn OFF: "))))) ^P\;
    [--]
    [UNLK Layer(s)]'-LAYER U \;
    [UNLK ALL Lyrs]'-LAYER U * ;
    [LOCK Layer(s)]'-LAYER LO
    [LOCK All but]'-LAYER LO * U (getvar "CLAYER") ;
    [LOCK Lyr Pick]*^C^C^P-LAYER LO (cdr (assoc 8 (entget (car (entsel "Select
    Item on Layer to LOCK: "))))) ^P\;
    [--]
    [THAW Layer(s)]'-LAYER T \;
    [THAW All Lyrs]'-LAYER T * ;
    [FRZ Layer(s)]'-LAYER F
    [FRZ All but]'-LAYER F * ;
    [FRZ Lyr Pick]*^C^C^P-LAYER F (cdr (assoc 8 (entget (car (entsel "Select
    Item on Layer to FREEZE: "))))) ^P\;

    The ones that use "Layer(s)" require user input, which can include multiple
    layer names separated by commas.
    The ones that use "All but" do whatever it is to all Layers but the current
    one.
    The ones that use "Pick" do whatever it is to the Layer of whatever entity
    you select, and repeat continuously. (Obviously there's no point in that
    variety for On or Thaw, since you wouldn't be able to pick anything on
    Layers that you wanted to do those things to.)

    Kent Cooper, AIA


    layer on wich I have picked an object.
    possible.
     
    Kent Cooper, AIA, Jul 13, 2004
    #3
  4. I notice I left out the end-of-submenu "<-" on the last line (I have a few
    additional things on this sub-menu, so it's on a later line). The last line
    should be:

    [<-FRZ Lyr Pick]*^C^C^P-LAYER F (cdr (assoc 8 (entget (car (entsel "Select
    Item on Layer to FREEZE: "))))) ^P\;

    And of course you'll have to put that and the other "Pick" items back onto
    one line each (the newsgroup system seems to split longer lines).


    Kent Cooper, AIA
     
    Kent Cooper, AIA, Jul 13, 2004
    #4
  5. km-aco

    jb4pres Guest

    why not try "layiso" layer isolate Turns off all layers except those selected. "Layon" turns everything back on for you.
     
    jb4pres, Jul 13, 2004
    #5
  6. Yes, see what jb4pres saying - you don't need special routines - these two
    Express tools commands are doing exactly what you want.
    Usually when you have a problem, there are two places to go first and search
    for solution - AutoCAD Help and Express Help (they are two separate help
    libraries).
    Then, if you can't find the answer there you are welcome in the forum.
    Well, as you see we will answer your question anyway but I think it is good
    for you (and for us) to try to help yourself first.
    Good luck.
    John
     
    John Georgiev, Jul 13, 2004
    #6
  7. km-aco

    Don I Guest

    Besides being easier on the people here, you'll be more likely to remember
    it if you found the answer yourself.
     
    Don I, Jul 14, 2004
    #7
  8. km-aco

    km-aco Guest

    Thank you everyone, and sorry for wasting your time with trivial questions !!!!
     
    km-aco, Jul 14, 2004
    #8
  9. Don't take it the bad way, please.
    That was just advice for your own good. See the post from Don above and
    you'll see what I'm trying to say. We all went thru this.
    Have a great day.
    John
     
    John Georgiev, Jul 14, 2004
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.