How to CAD in 2D only.

This post applies to AutoCAD, Civil 3D, and not as much to BricsCAD. Cut to the chase…set OSNAPZ to 1.

The impatient reader can just move on. You have your answer. If you need more of an explainer then let’s unpack this yearning to work in 2D only.

You create dwg files in 3D either by choice or sometimes you discover this by accident. You view the Properties of a line for example and notice the Z values on the start and end are different values. This line is 3D. When both Z values are the same the line is 2D. Whenever you are drawing lines and snapping to 3D objects you get 3D lines.

If you create polylines using PLINE you get 2D geometry, vertices all the same elevation. When you start the polyline your first pick using an object snap like END or NOD for example picks up the Z value. This is how you get 2D polylines but maybe not all at the same elevation. Joining polylines when they are at different elevations will fail and you may become mildly irritated at this workflow interruption. Often times you want all your polylines to have an elevation of zero but you still need the X and Y values of the objects you snap to. OSNAPZ when enabled allows you to snap to objects, get the X and Y, and ignore the Z. Oooh, I like that. 2D, skip the Z, that’s right for me, OSNAPZ!

<<Insert a video example of creating a polylines and snapping to a COGO points with a non-zero elevations. JOIN and fail.>>

When the system variable OSNAPZ is enabled (set to 1), it is used to replace the Z value with the value set by ELEV, another system variable. You can change the value of system variables by typing their name on the command line. Type OSNAPZ <ENTER> on the command line and you see it is set to 0. Type 1 <ENTER> to toggle on OSNAPZ. Also, type ELEV <ENTER> at the command line. You will see it is set to 0, unless you changed it. I find most people never change the ELEV system variable. Now when you draw a line between those two COGO points the endpoints have their Z at zero. (NOTE: You were a new user an some point in time and having instructions that included <ENTER> as a part of the instructions of what to type on the command line was helpful.)

At the start of each editing session of a drawing OSNAPZ always defaults to 0 (meaning it is toggled off). Frustrating, isn’t it? Let’s explore some ways to work around this limitation. Some of my suggestions may be beyond your abilities at the moment. Don’t worry, there is a solution in the list below that you may find useful.

You can add OSNAPZ=1 on a line in your acaddoc.lsp. Each time you open a drawing the acaddoc.lsp is read and the value of OSNAPZ is set to 1.

If you know how to create custom toolbars you can use this macro. ^C^COSNAPZ;1 (don’t forget the space after the 1).

Type OSNAPZ highlight it and press Ctrl+C to copy it to the Windows Clipboard. When you are ready to set OSNAPZ to 1 click on the command line and press Win+V to display Windows Clipboard History. Find OSNAPZ in the list and select it to paste it to the command line. Then type 1 <ENTER> to finish.

Finally, you can just continue to type OSNAPZ <ENTER>, 1 <ENTER> when you are reminded that you could have done that before you created that 3D line.

Those polylines that won’t JOIN? Try the FLATTEN command. Make sure you isolate the polylines or you may change something you wanted to keep 3D.

Now BricsCAD users have it super easy. Just right click on ESNAP on the status bar. Toggle on “Ignore Entity Snap Elevation”.

Avoiding non-zero Elevations while 2D drafting