Emboss 2014 Posted March 28 Posted March 28 I was working on iso drawing. I had set my object snaps how I wanted but I am not sure why they don’t stay as I set. I had to go in object snap setting every time and selected each of them. It was very inconvenient. Does anyone have this problem? I’m using AutoCad 2023. Any suggestions? Quote
BIGAL Posted March 28 Posted March 28 You have a program somewhere that is resetting the snaps, you are looking for variable osmode, set your osnaps to what you want then type osmode a number will appear, you can set different osnap combos and call as required, we used numbers no real reason could be zzz. You make some little lisp defuns and make sure they are loaded on startup. Some examples (defun C:15 ()(setvar "osmode" 15359)) ; sets all snaps on (defun C:47 ()(setvar "osmode" 47)(setvar "AUNITS" 0)) (defun C:99 ()(setvar "osmode" 99)) (defun C:8 ()(setvar "osmode" 8)) (defun C:59 ()(setvar "osmode" 15359)) (defun C:9 ()(setvar "osmode" 9)) (defun C:0 ()(setvar "osmode" 0)) Quote
Emboss 2014 Posted April 1 Author Posted April 1 On 3/28/2024 at 4:42 PM, BIGAL said: You have a program somewhere that is resetting the snaps, you are looking for variable osmode, set your osnaps to what you want then type osmode a number will appear, you can set different osnap combos and call as required, we used numbers no real reason could be zzz. You make some little lisp defuns and make sure they are loaded on startup. Some examples (defun C:15 ()(setvar "osmode" 15359)) ; sets all snaps on (defun C:47 ()(setvar "osmode" 47)(setvar "AUNITS" 0)) (defun C:99 ()(setvar "osmode" 99)) (defun C:8 ()(setvar "osmode" 8)) (defun C:59 ()(setvar "osmode" 15359)) (defun C:9 ()(setvar "osmode" 9)) (defun C:0 ()(setvar "osmode" 0)) interesting, when i typed OSMODE that set value is at 1 at this time. I just don't know how to bring up the (defun C:15 ()(setvar "osmode" 15359)) like your example? thanks. Quote
Emboss 2014 Posted April 1 Author Posted April 1 Is there any clear instructions step by step guide on how to get this program code set so that i can follow, there are some post from other site but it was since 2008. thank you Quote
BIGAL Posted April 1 Posted April 1 Copy what I posted and paste into notepad and save as say "osnaps.lsp". Do Appload, Start up suite and choose osnaps.lsp, it should then load automatically on start up, play with your osnap settings and make your own defun to suit, if osnaps gone just type like 47 and they will be back. 1 Quote
Emboss 2014 Posted April 1 Author Posted April 1 17 minutes ago, BIGAL said: Copy what I posted and paste into notepad and save as say "osnaps.lsp". Do Appload, Start up suite and choose osnaps.lsp, it should then load automatically on start up, play with your osnap settings and make your own defun to suit, if osnaps gone just type like 47 and they will be back. Hi Bigal, when you said "Do Appload, Start up suite and choose osnaps.lsp", how do i do that? just open the fresh AUTOCAD and open up that notepad that i saved? can you give me little more instructions. greatly appreciate your help. Quote
Emboss 2014 Posted April 1 Author Posted April 1 awesome, i was able to upload the .lsp file using the Appload command per your instructions. so far, the osnaps are remained check. What are those numbers stand for: ex: C15, C47, C99, C8?? THANK YOU. Quote
BIGAL Posted April 1 Posted April 1 (edited) The C:47 means you can type 47 on the command line, the C + colon means that the lisp defun can be used as a command, a (defun 47 would not work from command line if you type 47, when these defuns were made various users wanted different osnaps so it was easiest to just call the functions names as a number, if you make your own you could use (defun c:zzz as the triple z is easy to type, same as say aaa. Why not c:123, typing Myosnaps is to long for me. You could even do O1, O2 etc for 2 different osnap settings You will see in lots of code here the use of C : Edited April 1 by BIGAL 1 Quote
BIGAL Posted April 1 Posted April 1 Use say (defun c:24 ()(setvar 'osmode 24807)) or (defun c:zzz ()(setvar 'osmode 24807)) Quote
Emboss 2014 Posted April 2 Author Posted April 2 16 hours ago, BIGAL said: Copy what I posted and paste into notepad and save as say "osnaps.lsp". Do Appload, Start up suite and choose osnaps.lsp, it should then load automatically on start up, play with your osnap settings and make your own defun to suit, if osnaps gone just type like 47 and they will be back. So if the OSnaps gone, Can i just type 47 on the command line? thanks. Quote
BIGAL Posted April 2 Posted April 2 Only if you have pre loaded the matching defun. I have a Custom.lsp that has all sorts of stuff in it DTR RDT etc as well as these osnap settings, its autoloaded on start up. Quote
Emboss 2014 Posted April 2 Author Posted April 2 2 minutes ago, BIGAL said: Only if you have pre loaded the matching defun. I have a Custom.lsp that has all sorts of stuff in it DTR RDT etc as well as these osnap settings, its autoloaded on start up. Ok. Today I have noticed that the preset o snaps are gone again. I tried to figure out how to fix it. Still don’t know how to use the 47 command. Should I set them up on Workspace so it remains the same every time? Quote
BIGAL Posted April 2 Posted April 2 (edited) Just type Osmode and then 24807 will reset to what you want. In post 2 is some example lisp defuns for various osnap settings you must pre load the defun for it to work. It does not have to be 47 can be anything you want just change the 47. It is starting to sound like you have no idea about running lisp programs. Go back and slowly read all my messages. I can not hold your hand and set it up for you. You need to do some googling about using Appload and the "Start up suite". Edited April 2 by BIGAL Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.