disable F3 during command

Discussion in 'AutoCAD' started by RYANSTM, Jul 23, 2003.

  1. RYANSTM

    RYANSTM Guest

    I have a lisp for batt insulation, but when you run the lisp it turns off all Osnaps. I just want to add a command that would be like hitting the F3 key and in the end of the lisp it would turn the F3 back on. Any help is very appreciated.

    Thanks in advance

    Ryan
     
    RYANSTM, Jul 23, 2003
    #1
  2. RYANSTM

    BillZ Guest

    Add a line as one of the first lines of the lisp file.
    (setq oosnp (getvar "osmode"))
    and as one of the last lines of the file...(setvar "osmode" oosnp)

    Bill
     
    BillZ, Jul 23, 2003
    #2
  3. RYANSTM

    BillZ Guest

    You're welcome!



    Bill
     
    BillZ, Jul 23, 2003
    #3
  4. RYANSTM

    BillZ Guest

    <<< That solution sucks... here's why: >>>

    Martin,
    I answered the question. The question was not about error trapping or I would've addressed that. I agree that you should include variable re-setting in your error trap(s). I was only sticking to the original question. The solution I gave was, how to reset the original osnap settings at the conclusion of the program. If he would've asked "what if someone cancels in the middle of the program?" I would've gave him the error trap advice.

    Bill
     
    BillZ, Jul 24, 2003
    #4
  5. RYANSTM

    OLD-CADaver Guest

    hmmm... so every answer we post must come with complete with all the different possibilities covered. That'll certainly limit the number of posts.
     
    OLD-CADaver, Jul 24, 2003
    #5
  6. RYANSTM

    MVosters Guest

    How does that error trapping thing work. I have a couple lisp routines that that would come in handy. Have been trying to look through the help files, but they are not helping to much. Any help you guys can give would be great.

    Thanks
    Matt V.
     
    MVosters, Jul 25, 2003
    #6
  7. http://code.acadx.com/articles/008.htm

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | How does that error trapping thing work. I have a couple lisp routines
    that that would come in handy. Have been trying to look through the help
    files, but they are not helping to much. Any help you guys can give would be
    great.
    | Thanks
    | Matt V.
    |
     
    R. Robert Bell, Jul 25, 2003
    #7
  8. That is discussed in those articles.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | Thanks for the link, though that really didn't help much. I don't know
    anything about how to use error trapping, other then what I have read here.
    I want to know where to put the code, what kind of code I should use
    (syntax) etc..
    | Right now I have a lisp routine that turns off the osnap and turns them
    back on at the end of the routine. It would be nice to not have to reset the
    osnaps if I cancel it without having to hit undo a couple of times.
    |
     
    R. Robert Bell, Jul 25, 2003
    #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.