OSMODE System Variable in AutoCAD – How to Reset Your OSNAP Settings With a Number

osnap-settings

There will come a time when Autodesk’s AutoCAD will forget your object snap settings. Sometimes a poorly written lisp routine will reset them and occasionally they just change for no apparent reason. Thankfully there is a very easy way to get them back without going through the menus to change the check boxes.

AutoCAD uses a series of numbers that form unique sums which indicate the object snaps you are using. You can type OSMODE and then enter your unique sum and it will reset your object snaps.

Here are the bitcodes that determine your snaps:

0 NONe
1 ENDpoint
2 MIDpoint
4 CENter
8 NODe
16 QUAdrant
32 INTersection
64 INSertion
128 PERpendicular
256 TANgent
512 NEArest
1024 QUIck
2048 APParent Intersection
4096 EXTension
8192 PARallel

Add the codes for the object snaps that you prefer and then enter that value. For instance is you like endpoint (1) and intersection (32) then set the OSMODE value to 33. You can even take the next step and create buttons to set your favorite osnap group for any occasion.

My OSMODE is usually set to 191. I’ll let you figure out yours.

Author

Article Categories

1 thought on “OSMODE System Variable in AutoCAD – How to Reset Your OSNAP Settings With a Number”

  1. I’ve cut out the need for the OSMODE middle man with a bit of AutoLISP. My favorite setting is 167. So I added the following to the Acad.lsp file.

    (defun c:OO () (setvar “osmode” 167))

    Typing “OO” invokes the command. I chose that simply because that key combination was available and easy to get to. I also have one set to 35 which I use less frequently. For that I type “35”.

Comments are closed.