+ Reply to Thread
Results 1 to 6 of 6

Thread: Layer States

  1. #1
    Junior Member
    Using
    not specified
    Join Date
    May 2006
    Posts
    10

    Default Layer States

    Registered forum members do not see this ad.

    Is it possible to assign layer states to shortcut keys? Seems like something that would be reasonable to do but i am unable to find any way to do it.

  2. #2
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Computer:
    HP ZBook 17
    CPU:
    i7-4810MQ @ 2.80 GHZ
    RAM:
    16GB
    Graphics:
    Nvidia Quadro K4100M
    Primary Storage:
    256GB SSD
    Secondary Storage:
    1TB SATA
    Monitor:
    (2) HP 23"
    Discipline
    Civil
    rkmcswain's Discipline Details
    Discipline
    Civil
    Details
    CAD Manager
    Using
    Civil 3D 2017
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    4,455

    Default

    Assuming you have a layer state named "special", the following lisp code will restore it, using the shortcut RS

    Code:
    (defun c:rs ()
      (command "._layer" "_A" "_R" "special" "" "")
      (princ)
    )
    R.K. McSwain
    CAD Panacea | twitter

  3. #3
    Junior Member
    Using
    not specified
    Join Date
    May 2006
    Posts
    10

    Default

    alright i'm still pretty new with lisps, and i can type that code in and it works, but is there anyway to save that kind of lisp to the file so everytime i open the file those key codes are there?

  4. #4
    Senior Member
    Using
    not specified
    Join Date
    Feb 2006
    Location
    Guelph, Ontario
    Posts
    436

    Default

    copy the text from the code above and paste it into notebook. Save that file as "filename.lsp". Save this file into the support folder of autocad. Now go into AutoCAD and type in "appload" at the command prompt. In the "Startup Suite" click on Contents. Now click on add and search through and add "filename.lsp".
    Mike

  5. #5
    Super Moderator rkmcswain's Avatar
    Computer Details
    rkmcswain's Computer Details
    Operating System:
    Windows 7 Pro x64
    Computer:
    HP ZBook 17
    CPU:
    i7-4810MQ @ 2.80 GHZ
    RAM:
    16GB
    Graphics:
    Nvidia Quadro K4100M
    Primary Storage:
    256GB SSD
    Secondary Storage:
    1TB SATA
    Monitor:
    (2) HP 23"
    Discipline
    Civil
    rkmcswain's Discipline Details
    Discipline
    Civil
    Details
    CAD Manager
    Using
    Civil 3D 2017
    Join Date
    Sep 2005
    Location
    Houston
    Posts
    4,455

    Default

    ...and even more details here:

    http://cadtutor.net/forum/viewtopic.php?t=2942
    R.K. McSwain
    CAD Panacea | twitter

  6. #6
    Junior Member
    Using
    not specified
    Join Date
    May 2006
    Posts
    10

    Default

    Registered forum members do not see this ad.

    worked like a charm, you guys are good

Bookmarks

Posting Permissions

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