Cancel in Lisp

Discussion in 'AutoCAD' started by sashk, Aug 7, 2003.

  1. sashk

    sashk Guest

    Hello All,

    I have a weird one again. When autocad first starts up, I have a (menucmd "p0=xxxxx") (menucmd "p0=*)which pops up a scale box. The only problem is that it is grayed out. When I hit the ESC button and go to the scale box, it is back to its normal state. This did not happen in r14, but it is happening to us in r200i and r2004. Anyone know why?

    If not, how can I hake it so that it would cancel (like hitting esc) on the first past with the (menucmd "p0=*) (cancel?) and then bring up the (menucmd "p0=*) again so that the box does not gray out. Thanks
     
    sashk, Aug 7, 2003
    #1
  2. sashk

    PF Guest

    Sounds to me the (Menucmd "p0=*") is running BEFORE the menu has fully
    loaded....
    Is this in an MNL file, or in a LSP file called from the MNL... or Where?

    Examine the sequence... change it to be the LAST command in those startup
    commands.


    Else, try this: ^C^C = cancel.... as does (command) within Lisp file--
    syntax similar to:

    (defun setup_scale ()
    (Menucmd "p0=xxxx")
    (Menucmd "p0=*")
    (command)
    )
     
    PF, Aug 7, 2003
    #2
  3. sashk

    PF Guest

    ACADDOC.lsp loads (I forgot: once per session, or once per open dwg) -
    either way, it doesn't load with the Mneu-- the MNL file does!

    try moving it to the menu's MNL file... that runs immediately after the
    menu loads.

    Menu-name.mnc has a corresponding Menu-name.MNL <- put the command there.

    If you don't have a corresponding MNL file, create a copy of ACADDOC.lsp....
    erase all BUT the 'problem' command and rename the copy to become the
    corresponding MNL.
    Then remove the 'problem' line from the ACADDOC.lsp file... only one Menucmd
    command should exist.
     
    PF, Aug 8, 2003
    #3
  4. sashk

    sashk Guest

    PF,

    I tried everything you said, but no luck. Yesterday, I tool the acaddoc.lsp and made it into a .mnl file. Same results. Then today, I did what you said, but still no luck. I for the life of me cannot understand whats going on with this thing. It used to work in R14, but not in 2000i and not in 2004. As soon as I hit the ESC. button and call up the same pop-up, it works fine. Any other ideas??
     
    sashk, Aug 8, 2003
    #4
  5. sashk

    PF Guest

    Have you looked at what else auto-loads upon startup?

    (otherwise, sadly, not at this time ... Will be out for a week... so this
    is my last "crack" at this posting.)
    good luck! - and consider it PART of your menu problem... they may be tied
    together.
     
    PF, Aug 10, 2003
    #5
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.