Help with little shortcut lisp

Discussion in 'AutoCAD' started by ccyc, Mar 22, 2005.

  1. ccyc

    ccyc Guest

    I have a lisp routine to turn all layers on. See example:

    ;Turns ALL Layers ON
    (defun C:eek:o ()
    (command "-layer" "on" "*" )
    (princ))

    The problem is when I execute the command I have to hit enter twice to end the command. Once after I issue the shortcut and then again to exit the -layer command.

    What do I need to add to eliminate the second enter?

    Thanks in adavance!
    Chris
     
    ccyc, Mar 22, 2005
    #1
  2. ccyc

    Casey Guest

    Try this..

    (command "-layer" "on" "*" "" )

    Casey
     
    Casey, Mar 22, 2005
    #2
  3. ccyc

    BillZ Guest

    (defun C:eek:o ()
    (command "-layer" "on" "*" "")
    (princ))
     
    BillZ, Mar 22, 2005
    #3
  4. ccyc

    ECCAD Guest

    Change:
    (command "-layer" "on" "*" )
    To:
    (command "-layer" "on" "*" "")

    Bob
     
    ECCAD, Mar 22, 2005
    #4
  5. ccyc

    ECCAD Guest

    You are quicker.
    :)
    Bob
     
    ECCAD, Mar 22, 2005
    #5
  6. ccyc

    Casey Guest

    But if you have express tools, this is already done for you.... the command
    is layon.... which you could shortcut too in your pgp file...

    Casey
     
    Casey, Mar 22, 2005
    #6
  7. ccyc

    Matt Trucks Guest

    Or just type "layon" in the command line.

     
    Matt Trucks, Mar 22, 2005
    #7
  8. ccyc

    ccyc Guest

    Thank yall so much - wow do I feel stupid - such an easy fix. I swear I tried that - guess not.

    Casey - I have set this little lisp up for On, Off, Freeze, Tha, Lock, Unlock. Express Tools don't have all of those.

    Chris
     
    ccyc, Mar 22, 2005
    #8
  9. ccyc

    Casey Guest

    Yes it does......

    layon
    layoff
    layfrz
    laythw
    laylck
    layulk

    are all express tools commands that do all of whay you stated.
     
    Casey, Mar 22, 2005
    #9
  10. ccyc

    ccyc Guest

    I didn't Realize that - Thanks! Casey
     
    ccyc, Mar 22, 2005
    #10
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.