Lisp that will disable osnap automatically( temporarily) when zooming autocad 2002

Discussion in 'AutoCAD' started by Karu Yechiam, Jan 26, 2005.

  1. Karu Yechiam

    Karu Yechiam Guest

    I need lisp that will allow me the use of osnap, but will autmatically
    disable osnap when I use zoom window.
    Thanks

    Yechiam Karu Architect
     
    Karu Yechiam, Jan 26, 2005
    #1
  2. Karu Yechiam

    LUCAS Guest

    ;;Try
    (defun C:TT (/ HOLDECHO)
    (setq HOLDECHO (getvar "CMDECHO"))
    (setvar "CMDECHO" 1)
    (command "_.ZOOM" "W" "INT,CEN,END,MID"
    PAUSE "INT,CEN,END,MID"
    PAUSE
    )
    (setvar "CMDECHO" HOLDECHO)
    (princ)
    )
     
    LUCAS, Jan 26, 2005
    #2
  3. I think that what you have is exactly the opposite of what he wants.

    (command "_.ZOOM" "W" "NON")
    PAUSE "NON"
    PAUSE
    )

    Should do the trick

    Casey
     
    Casey Roberts, Jan 26, 2005
    #3
  4. Casey's approach isn't transparent. If you do it with a menu macro item,
    rather than a (command) function, you can also do it in the middle of
    another command:

    [ZoomWnoOsnap]'ZOOM W NON \NON
     
    Kent Cooper, AIA, Jan 26, 2005
    #4
  5. Karu Yechiam

    Karu Yechiam Guest

    It does not work for me
    do you know why?
     
    Karu Yechiam, Jan 27, 2005
    #5
  6. Karu,

    you may need to add an "_" (underscore) before the command(s) if you aren't using an english version of autocad - i.e. -

    (command "_.ZOOM" "_W" "_non" PAUSE "_non" PAUSE)

    Also - with activex:

    (defun c:zw ()
    (vl-load-com)
    (vla-ZoomPickWindow (vlax-get-acad-object))
    (princ))

    regards - Peter
     
    petersciganek, Jan 27, 2005
    #6
  7. Karu Yechiam

    thebbbrain Guest

    Isn't this feature controlled by the User Preferences being set to Keybard Entry except scripts?
     
    thebbbrain, Jan 27, 2005
    #7
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.