We are a survey company that spends most drawing time connecting COGO points with linework at Z=0 (flat planar drawings for finished plats). This requires that we set OSNAPZ to 1.
In Civil 3D 2014, we've found that if 1) we start a new drawing, or 2) we close and then open an existing drawing, we find that OSNAPZ has reverted to 0, so that new linework comes in at all sorts of nonsensical elevations and must be edited.
I'm sure there's a way to set the template to retain the setting OSNAPZ=1, in order that whenever new or existing drawings are opened we can begin work without having to re-set this variable every time.
How do we do this?
Thanks for the help.
Solved! Go to Solution.
Solved by bcollins. Go to Solution.
Solved by jmayo-EE. Go to Solution.
http://forums.autodesk.com/t5/AutoCAD-2010-2011-2012/Save-OSNAPZ-setting/td-p/2685549
Set it in the Acaddoc.lsp file.
John Mayo
Rick Jackson
Survey CAD Technician VI
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
This macro can be placed in a toolbar button or ribbon button
(setvar "OSNAPZ" (if (= (getvar "OSNAPZ") 1)0 1)).
John Mayo
Thanks for the reference, which thus far has not proved helpful. The poster stated:
"For the record, I created acaddoc.lsp which contained
(setvar "osnapz" 1)
in my C:\Program Files\AutoCAD Civil 3D 2010\Support folder."
Tried this, but the file doesn't run, i.e., doesn't change the osnapz setting. Likely I am missing some code, not being a LISP expert. Is there a way around this?
Go to the options dialog, files tab and note the support path at top of the list. This is the folder acad will search first for acaddoc.lsp. This is the controlling folder. Pop the acaddoc.lsp in here. Restart Acad and it should run.
Excerpt from my acaddoc.lsp. All of these variables get reset with every file I open.
(defun-q S::STARTUP ()
(princ "Changing VIEWRES...")
(command "VIEWRES" "Y" 12500)
)
(setvar "SAVETIME" 10)
(setvar "pickadd" 2)
(setvar "pickfirst" 1)
(setvar "PeditAccept" 1)
(setvar "mirrtext" 0)
(setvar "plinegen" 1)
(setvar "filedia" 1)
(setvar "cmddia" 1)
(setvar "pellipse" 1)
(setvar "plinetype" 2)
(setvar "ISAVEBAK" 1)
(setvar "GeoMarkerVisibility" 0)
(setvar "GripsMultifunctional" 1)
(setvar "SelectionAnnoDisplay" 0)
(setvar "HPQuickPreview" Off)
(command "-plotstamp" "0")
John Mayo
Rick Jackson
Survey CAD Technician VI
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Include the line below in acaddoc.lsp
(setvar "MODEMACRO" "OSNAPZ = $(getvar, osnapz)")
to get this to show all the time so you know what the setting is
neilyj (No connection with Autodesk other than using the products in the real world)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
I'm also a surveyor who works for an engineering firm and I approached the solution a little differently. I'm ok with lsp routines but not great. So if I can find a solution to an issue that doesn't involve using one then that's the route that I'd prefer to take. I opened my drawing template, went to toolspace -> settings tab -> point -> point styles. Right click on the name of one of your styles and hit "edit". In the box that opens up, click on the 3D geometry tab and next to the "Point Display Mode", select "Flatten Points to Elevation" and then next to "Point Elevation", set the elevation to 0.
That has worked like a champ for us. You'll need to do this same step for each of your Point Styles, but as long as you make the change in your template then you'll only have to do it once (other than existing drawings of course). I was nervous that it would mess with our surfaces if we flattened everything to 0, but so far we haven't seen any ill effects from it. It doesn't change the elevation of your point to 0 - just draws the point marker at that elevation. This is also something that you can change DURING the process of your project. If you need your points at their elevations instead of 0 then just go back and change the point style from "Flatten Points to Elevation" to "Use Point Elevation". You don't have to reimport the points or anything like that. All you're really changing is the elevation of the point marker.