Hi all,
Is there any way to set Osnapz to 1 permanently? It always defaults back to 0 when I open AutoCAD. Thanks for any input.
kwong
|
Hi all,
Is there any way to set Osnapz to 1 permanently? It always defaults back to 0 when I open AutoCAD. Thanks for any input.
kwong
Hi kwong,Originally Posted by kwong
One way is to edit or create acaddoc.lsp and addto it. Make sure to save it in one of your support paths defined in options/files if you create it.Code:(setvar "osnapz" 1)
HTH
Great Tim, thanks very much.
kwong
AutoCAD does not save this variable. This is why it defaults back to 0. You would need to go with Tim's earlier suggestion.Originally Posted by kwong
If you have a technical question, please find the appropriate forum and ask it there.
You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
jUSt
...just to add my 2¢....
All system variables can be found in HELP. For each variable, the location it's saved (if any) is noted. As mentioned, OSNAPZ is not saved. Other variables are saved in the drawing, and others are saved in the registry.
One more tip... Create a directory like C:\Cadstuff and add this to the TOP of your support file search path. Add your acaddoc.lsp there and anything else you want to customize (such as a linetype file, hatch patterns, PGP file, etc.). Then when you upgrade, repair, reinstall, move to a different machine, etc. - you don't have to worry about finding these files - they will all be in one place.
Adding this path to the TOP of the support file search path ensures that your files are found first, regardless if other files with the same name exist somewhere else (like in Autodesk's \support directory)
R.K. McSwain | CAD Panacea |
rkmcswain,
Your '2¢' has been printed & added to my ACAD valuable info notebook. Thanks all who responded.
kwong
By putting a file in the top of the support path, I assume it overrides something of the same name later on in the path?
Yes. If you have 2 or more "acaddoc.lsp" files for example, AutoCAD will only load the first one it finds, and it searchs in the order the paths are listed. The one catch to the rule is that the current directory is always "first" in the support file search path. This isn't listed in OPTIONS and of course it varies depending on the location of the drawing.Originally Posted by Chad_C
Generally speaking you won't have AutoCAD support files in a drawing directory - although you could use this to your advantage if you needed certain things to occur with certain drawings.
FWIW - I tried to sum all this up this morning. See: http://rkmcswain.blogspot.com/2006/0...setup-and.html
Last edited by rkmcswain; 2006-07-02 at 12:59 PM.
R.K. McSwain | CAD Panacea |
My first path in "Support File Search Path" is: C:\Users\cvolosy\document\cmv
IMG_6330.jpg
That is where I put an acad.lsp (ACAD.LSP) file. I also made a copy and made an acaddoc.lsp file. (because in my ACAD it says "Load acad.lsp when opening each drawing" as an option).
IMG_6331.jpg
I checked: "...libraries..." is the same path as above
IMG_6332.jpg
This is in my acad.lsp & acaddoc.lsp files:
(setvar "filedia" 1)
(setvar "osnapz" 1)
IMG_6335.jpg
I closed out of ACAD Civil 3D 2015. I reopened and opened a drawing. OSNAPZ is still set to 0!
I have attached images for review.
Welcome to AUGI.
Use the SYSVDLG Command to search for OSNAPZ sysvar, and note the 'Saved In' property.
Also, in your ACAD.lsp, set ACADLSPASDOC sysvar == 0 (Saved In Registry) so it only loads once, at session launch. Then, you can place SETVAR calls for Registry-saved sysvars in ACAD.lsp, and Drawing-saved (or not saved) sysvars in ACADDOC.lsp to minimize duplicate calls, and speed up session start & drawing open.
Cheers
Thread zombified.
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000