See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: All Layer ON and All Layer Thaw

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2013-09
    Posts
    1
    Login to Give a bone
    0

    Default All Layer ON and All Layer Thaw

    In previous releases there were two Express Tools which would turn all layers On or Thaw all layers. Am I mistaken that these tools are no more?
    Has anyone found this functionality somewhere else or written LISP routines to accomplish these tasks?

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: All Layer ON and All Layer Thaw

    All of the "layer" commands that were previously bonus or express tools were moved into core AutoCAD in (I think) the 2007 version.

    LAYON command will turn all layers on.

    LAYTHW command will thaw all layers.
    R.K. McSwain | CAD Panacea |

  3. #3
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: All Layer ON and All Layer Thaw

    FWIW -

    Given the thread title, and particularly for 'quick' commands with little, or no user prompting, I prefer the -LAYER Command:

    Code:
    (defun c:AllOnThaw ()
      (command "._-layer" "_on" "*" "_t" "*" "")
      (princ)
    )
    Last edited by BlackBox; 2014-11-26 at 05:44 PM. Reason: Redundant code removed.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: All Layer ON and All Layer Thaw

    Why use lisp to do the same thing as built in core commands?
    R.K. McSwain | CAD Panacea |

  5. #5
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: All Layer ON and All Layer Thaw

    Quote Originally Posted by rkmcswain View Post
    Why use lisp to do the same thing as built in core commands?
    ... Why not?
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  6. #6
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: All Layer ON and All Layer Thaw

    For the same reason you wouldn't do this?

    Code:
    (defun c:line ( / pt1 pt2)
      (setq pt1 (getpoint "\n Pick first point: "))
      (setq pt2 (getpoint pt1 "\n Pick next point: "))
      (entmake
        (list
          (cons 0 "LINE")
          (cons 10 pt1)
          (cons 11 pt2)
        )
      )
    )
    Unless you're adding some functionality, or removing some unneeded steps - I don't see any reason to duplicate what's already there.
    R.K. McSwain | CAD Panacea |

  7. #7
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: All Layer ON and All Layer Thaw

    Quote Originally Posted by rkmcswain View Post
    Quote Originally Posted by BlackBox View Post
    Quote Originally Posted by rkmcswain View Post
    Why use lisp to do the same thing as built in core commands?
    ... Why not?
    For the same reason you wouldn't do this?

    Code:
    (defun c:line ( / pt1 pt2)
      (setq pt1 (getpoint "\n Pick first point: "))
      (setq pt2 (getpoint pt1 "\n Pick next point: "))
      (entmake
        (list
          (cons 0 "LINE")
          (cons 10 pt1)
          (cons 11 pt2)
        )
      )
    )
    Unless you're adding some functionality, or removing some unneeded steps - I don't see any reason to duplicate what's already there.
    So I understand you correctly; you posit that the AllOnThaw routine I posted above, does not meet your own criteria?
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  8. #8
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,095
    Login to Give a bone
    0

    Default Re: All Layer ON and All Layer Thaw

    Quote Originally Posted by BlackBox View Post
    So I understand you correctly; you posit that the AllOnThaw routine I posted above, does not meet your own criteria?
    BB, I'll agree with you that the AllOnThaw routine you created is not within the software and it does remove unneeded steps. It is also a quick way to combine the two commands. However, the other two routines do not meet that criteria.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  9. #9
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    1

    Default Re: All Layer ON and All Layer Thaw

    Quote Originally Posted by Opie View Post
    BB, I'll agree with you that the AllOnThaw routine you created is not within the software and it does remove unneeded steps. It is also a quick way to combine the two commands. However, the other two routines do not meet that criteria.
    Now I understand; I wish this had been made clear when I sincerely asked 'why not' (you incorrectly assumed I was familiar with these commands, LoL)!

    Full disclosure: I rarely either turn on, or thaw 'every' layer (just not needed for our workflows), and admittedly do not recall using either the LAYON or LAYTHW Commands... What I did here, was mistakenly assumed that they function similar to the LAYULK Command (which I do use), in that some user input graphical, or dialog selection was needed, hence the two less useful offerings.

    Redundant code removed.

    Now, I'll also add that after a quick speed test (particulars excluded), I've found that both the LAYON and LAYTHW Commands are faster than their redundant -LAYER Command counterpart above (now removed), which is interesting given this thread's discussion. That said, the combo still posted above is faster than running both LAYON and LAYTHW sequentially as separate COMMAND calls (to mimic user entry, as is done with the -LAYER call + parameters). This is not the case however, when you call both LAYON and LAYTHW sequentially from the same COMMAND call, which I am again surprised by.

    In any event, here's the fastest pairing I am aware of at this time to both turn on, and thaw all layers:

    Code:
    (defun c:AllOnThaw2 ()
      (command "._layon" "._laythw")
      (princ)
    )

    ... Thanks for your time, and patience.

    Cheers
    Last edited by BlackBox; 2014-11-26 at 07:37 PM.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  10. #10
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,095
    Login to Give a bone
    0

    Default Re: All Layer ON and All Layer Thaw

    And, yet, it is still faster than someone needing to execute both commands manually, no matter what combination you have in the routine. Thanks for the additional analysis on the fastest way to do the task at hand.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 12
    Last Post: 2016-04-19, 06:09 PM
  2. -Layer Freeze/Thaw in Viewport
    By Wish List System in forum AutoCAD Wish List
    Replies: 6
    Last Post: 2014-09-24, 04:03 AM
  3. thaw layer lisp
    By rgravelle in forum AutoCAD Customization
    Replies: 14
    Last Post: 2010-02-25, 04:31 PM
  4. Creating LISP for Layer Thaw / On
    By Loc in forum AutoLISP
    Replies: 8
    Last Post: 2009-06-03, 03:42 AM
  5. Unable to thaw Defpoints layer within a Layer State.
    By scotthop in forum AutoCAD General
    Replies: 4
    Last Post: 2008-04-04, 09:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •