I tried your button code in 2005 and it works. What happens when you try this in 2006? And if you ues a "^P" in front of the lisp code, it won't be echoed on the command line.
Registered forum members do not see this ad.
I had a button in ACAD 2000 I used to switch from regular to iso snap, the command was:
^C^C(if (= (getvar "snapstyl") 1) (setvar "snapstyl" 0) (if (= (getvar "snapstyl") 0) (setvar "snapstyl" 1)))(princ)
however this won't work in 2006. Doesn anyone have anything I could use instead? Thanks.




I tried your button code in 2005 and it works. What happens when you try this in 2006? And if you ues a "^P" in front of the lisp code, it won't be echoed on the command line.
I tried the code in 2006 and it changes to iso snap, but it doesn't change it back. The first time I run it (with cursor in normal position) it changes. When I run it again it seems to return the cursor in the middle of the program, but returns it to iso and gives me a message:
; error: extra right paren on input




Registered forum members do not see this ad.
I don't know why you would get that, parentheses look OK. Perhaps 2006 has a problem with spaces in the code? Try the following, which does the same thing with less code and spaces removed:
Oops, using the "code" button added spaces:Code:^C^C^P(if (=(getvar "snapstyl")1)(setvar "snapstyl" 0)(setvar "snapstyl" 1))(princ)
C^C^P(if (=(getvar "snapstyl")1)(setvar "snapstyl" 0)(setvar "snapstyl" 1))(princ)
Bookmarks