Reversing layers

Discussion in 'AutoCAD' started by liv4gzus, Jan 26, 2004.

  1. liv4gzus

    liv4gzus Guest

    I am looking to find out if there is a single command that will reverse all layers at once. For example, if I have 5 layers in a drawing and 3 are frozen and 2 are thawed, is there a single command that will reverse these layers so that there would now be 2 frozen and 3 thawed? I know if I only have a small amount of layers reversing them by simply picking them is fine, but if you have 100 it gets to be a little tedious. Thanks for the help.
     
    liv4gzus, Jan 26, 2004
    #1
  2. liv4gzus

    Jeff Mishler Guest

    See my response to this question in the 2002general newsgroup.

    Jeff

    all layers at once. For example, if I have 5 layers in a drawing and 3 are
    frozen and 2 are thawed, is there a single command that will reverse these
    layers so that there would now be 2 frozen and 3 thawed? I know if I only
    have a small amount of layers reversing them by simply picking them is fine,
    but if you have 100 it gets to be a little tedious. Thanks for the help.
     
    Jeff Mishler, Jan 26, 2004
    #2
  3. liv4gzus

    liv4gzus Guest

    Jeff,

    I saw your response. Could you please send me that lsp at . I would appreciate it. Thanks.
     
    liv4gzus, Jan 26, 2004
    #3
  4. liv4gzus

    ECCAD Guest

    Here is a Lisp:
    Give it a whirl.

    (defun C:RL (); reverse Layers..
    ;; note: Only Freeze / Thaw, does not 'lock' or set 'plot' bits.
    (setq laylist nil)
    (setq lt (tblnext "LAYER" T)); reset to top of Table
    (while (setq lt (tblnext "LAYER"))
    (setq ln (cdr lt))
    (setq lx (cdr (assoc 2 ln)))
    (if (/= lx "0")
    (progn
    (setq x (cdr (assoc 70 ln))); get visible bit
    (if (= x 0)
    (command "_layer" "_on" lx "_f" lx "")
    ); end if
    (if (= x 1)
    (command "_layer" "_on" lx "_t" lx "")
    ); end if
    ); end progn
    ); end if
    ); end while
    (princ)
    ); end function

    Bob Shaw
    (bobscadshop.com)
     
    ECCAD, Jan 26, 2004
    #4
  5. liv4gzus

    The real JD Guest

    Could you post it the Customer files newsgroup?
    Thx
    Cheers!
     
    The real JD, Jan 27, 2004
    #5
  6. liv4gzus

    Jeff Mishler Guest

    Done!

    Jeff

     
    Jeff Mishler, Jan 27, 2004
    #6
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.