Force OSNAPZ to 1

True story: When I bought my last car, I wanted vanity license plates that read "OSNAPZ". When the dealer looked in the system to see if it was available, it was already taken! I was bummed, but ended up with plan B; plates that said "C3D Girl".

OSNAPZ is a system variable that determines whether or not elevation is taken into account when using object snaps.  When the setting is 0 (the default), Autocad will use the elevation of an object.  When the setting is 1, elevation is ignored on most objects.

Whether or not elevation is taken into account is a huge deal when working in a Civil 3D drawing. This setting affects the distance inquiry commands.

Most other variables are stored in the registry or the drawing – but OSNAPZ is an exception.

To get OSNAPZ to set to 1 every time a drawing is open, see if you already have a file in C:\Program Files\Autodesk\Autodesk AutoCAD Civil 3D 2014\Support\ called acaddoc.lsp. You may want to check the C:\Program Files\Autodesk\Autodesk AutoCAD Civil 3D 2014\Support\en-us\ folder too. If you do find this file open it up in notepad and add the following to its own line:

(setvar "osnapz" 1)

Save and close the file and you should be good to go.

If you don’t already have a file called acaddoc.lsp, just make a new text file in one of the paths I mentioned above and rename it (make sure it ends with .lsp rather than .txt). Throw the line in there and save and close the file.

The reason you want to make sure there is only one file called acaddoc.lsp is because Autocad will only read the first one it finds in the support file search paths (pictured right) – so if you put it in a second one your trick will get ignored. 

Have a Happy Snappy Day!