Layfrz Nesting Toggle Pet Peeve

Discussion in 'AutoCAD' started by JamieLandmark, Mar 2, 2005.

  1. Hello,

    I frequently use layfrz to freeze layers. I often have to change the options between block and entity level nesting. Can someone tell me if it's possible to: instead of typing "o" and then "b" or "e" (or "n"), I could simply type "b", "e", or "n" - foregoing the "o". Is there a lisp, .mnu, etc. method?

    It would save me a step that has become a pet peeve.

    Thanks for any help,

    Jamie
     
    JamieLandmark, Mar 2, 2005
    #1
  2. JamieLandmark

    Joe Burke Guest

    Jamie,

    Since layfrz is part of Express Tools it's an external command. So you can't do this
    with LISP: (command "layfrz" "o" pause) or this (c:layfrz "o"). There just isn't an
    easy way to deal with this sort of thing, AFAIK.

    Here's what I would do, though it's not a free solution. I use a program called
    QuicKeys from CE Software. Cost is $99.95. Setup a TypeText key which enters < layfrz
    o (enter or space) > at the command line. The key is assigned to some keyboard
    shortcut. Could be an F key, or something like the End key, or some Ctrl or Alt
    combination. When you hit whatever, QuicKeys types the text as if it was entered
    manually, which solves the problem.

    Note, the keyboard shortcut can be setup to only apply to AutoCAD. It would not
    operate in other programs.

    QuicKeys is useful for other things. For instance, alias keystrokes to other keys.
    When I want to enter 5'6" I do it at the numeric keypad with 5+6.

    http://www.cesoft.com/products/qkw.html

    Joe Burke < not associated with CE Software
     
    Joe Burke, Mar 2, 2005
    #2
  3. Hey Joe,

    Thanks for the tip re: QuicKeys. I'll look into it and find out if it's worth the $100 to eliminate my pet peeve :) I'm sure I could find other advantages to the software as well.

    Thanks again for your help.

    BTW, if anyone else has a solution suggestion, please let me know.

    Regards,

    Jamie
     
    JamieLandmark, Mar 2, 2005
    #3
  4. JamieLandmark

    Josh Guest

    in acetlay.lsp the mechanism for setting options doesn't lend itself to what
    you want to do...

    One solution (there are plenty of others) is to set the option before you
    start the command.

    You could make a 3-button flyout of the layfrz button on the ET layer
    toolbar...one for each option: block, entitity, none.

    The code for the None option button:
    ^C^C(setenv "ACET_Layfrz" "1");layfrz

    The code for the Entitiy option button:
    ^C^C(setenv "ACET_Layfrz" "2");layfrz

    The code for the Block option button:
    ^C^C(setenv "ACET_Layfrz" "3");layfrz


    options between block and entity level nesting. Can someone tell me if it's
    possible to: instead of typing "o" and then "b" or "e" (or "n"), I could
    simply type "b", "e", or "n" - foregoing the "o". Is there a lisp, .mnu,
    etc. method?
     
    Josh, Mar 2, 2005
    #4
  5. Hey Josh,

    Thanks for the tips re: the ET layer toolbar.

    Is there a way to activate each macro via an alias instead?

    Thanks,

    Jamie
     
    JamieLandmark, Mar 2, 2005
    #5
  6. JamieLandmark

    Josh Guest

    Sure...
     
    Josh, Mar 2, 2005
    #6
  7. JamieLandmark

    Josh Guest

    Dang it...hit the reply too quick on the last one...

    Change the lfn/lfe/lfb to whatever you want...
    (defun c:lfn () (setenv "ACET_Layfrz" "1") (c:layfrz)(princ)) ; no nesting
    (defun c:lfe () (setenv "ACET_Layfrz" "2") (c:layfrz)(princ)) ; entity
    nesting
    (defun c:lfb () (setenv "ACET_Layfrz" "3") (c:layfrz)(princ)) ; block
    nesting

    Cheers,
    Josh
     
    Josh, Mar 2, 2005
    #7
  8. Hey Josh,

    Thanks a lot for the routines. I'll try them out :)

    The only downside I can see (and could see beforehand) is that I'll have to escape the layfrz command before enacting each routine.

    The procedure now is:
    1. "esc"
    2. macro

    Whereas before it was:
    1. "o"
    2. "n" or "e" or "b"

    It's still 2 steps if I'm already using layfrz. But if I'm about to use it, and want a quick way to change the nesting, it's only 1 step, instead of 3.

    Thanks for helping :)

    Jamie
     
    JamieLandmark, Mar 2, 2005
    #8
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.