Jump to content

Object snaps didn’t stay as preset


Recommended Posts

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?

IMG_9295.jpeg

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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. 

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by BIGAL
  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by BIGAL
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...