See the top rated post in this thread. Click here

Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Is there a way to set Osnapz to 1 permanently?

  1. #1
    I could stop if I wanted to kwong's Avatar
    Join Date
    2002-11
    Posts
    270
    Login to Give a bone
    0

    Default Is there a way to set Osnapz to 1 permanently?

    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

  2. #2
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473
    Login to Give a bone
    0

    Default Re: Is there a way to set Osnapz to 1 permanently?

    Quote Originally Posted by 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,

    One way is to edit or create acaddoc.lsp and add
    Code:
     (setvar "osnapz" 1)
    to it. Make sure to save it in one of your support paths defined in options/files if you create it.

    HTH

  3. #3
    I could stop if I wanted to kwong's Avatar
    Join Date
    2002-11
    Posts
    270
    Login to Give a bone
    0

    Default Re: Is there a way to set Osnapz to 1 permanently?

    Great Tim, thanks very much.

    kwong

  4. #4
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Is there a way to set Osnapz to 1 permanently?

    Quote Originally Posted by kwong
    It always defaults back to 0 when I open AutoCAD.
    AutoCAD does not save this variable. This is why it defaults back to 0. You would need to go with Tim's earlier suggestion.
    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

  5. #5
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    1

    Default Re: Is there a way to set Osnapz to 1 permanently?

    ...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 |

  6. #6
    I could stop if I wanted to kwong's Avatar
    Join Date
    2002-11
    Posts
    270
    Login to Give a bone
    0

    Default Re: Is there a way to set Osnapz to 1 permanently?

    rkmcswain,
    Your '2¢' has been printed & added to my ACAD valuable info notebook. Thanks all who responded.
    kwong

  7. #7
    AUGI Addict .chad's Avatar
    Join Date
    2006-04
    Location
    is it lunch time yet?
    Posts
    1,129
    Login to Give a bone
    0

    Default Re: Is there a way to set Osnapz to 1 permanently?

    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?

  8. #8
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Is there a way to set Osnapz to 1 permanently?

    Quote Originally Posted by Chad_C
    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.

    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 |

  9. #9
    Member
    Join Date
    2018-01
    Posts
    5
    Login to Give a bone
    0

    Default Re: Is there a way to set Osnapz to 1 permanently?

    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.

  10. #10
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Is there a way to set Osnapz to 1 permanently?

    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

Page 1 of 3 123 LastLast

Similar Threads

  1. How to turn off OSNAPZ temporarily for 3DPOLY
    By GreyHippo in forum AutoLISP
    Replies: 1
    Last Post: 2011-11-04, 05:27 PM
  2. UCS Permanently OFF
    By lonewolfjustin in forum AutoCAD General
    Replies: 35
    Last Post: 2008-03-12, 01:01 PM
  3. Permanently set INSUNITS to 0
    By pamela.johnsen in forum AutoCAD General
    Replies: 8
    Last Post: 2007-03-09, 09:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •