Ihave been putting up with a problem for about a year and a half now where osmode changes every time I opena drawing. The new settings result in no tooltips and no visual cues that anything is being snapped to even though object snaps are active. If I make a selection and am near any enabled snap point there is an obvious snap-to-point but there was not any cue before hand that the snap would take place.
I am the resident CAD Manager and the only lisp writer in the company. I don't think I've done what you've suggested (but you never know). All of my efforts have been to ensure that my osnaps are what I made my button to set them to. I use (SETVAR "OSMODE" ####) to force what I want. Automatic load and run lisp won't get it done for me either. I'm baffled.
If this is a registry saved entry there may be a reason for it though. I'm needing to reinstall Windows 7 soon to fix some registry issues identified by Condusiv Technologies (makers of Diskeeper) that prevent successful installation of that product. The issues are wide spread and hard to track down and fix manually. They involve rights and ownership settings that were apparently changed in the registry at some point. I have used a registry modification for about a year and a half that adds a "Take ownership" option to my windows right-click menu in windows explorer. I must have taken ownership of things I shouldn't have... who knew? I didn't know that taking ownership modifies the registry anyway.
When you say it keeps changing, are you saying that you change it to what you want, save, close and re-open the file, it has revertted? If that's the case, then it really sounds like SOMETHING is running when you open a dwg file that changes these settings. OSMode is stored in the dwg file.
Allen Jessup
CAD Manager - Designer
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 new to the email reply function. It looked like private messages to me so including my standard email signature wasn't seen as a problem. I wish I had known better. Oh well, live even longer, learn even more...
Anyway, I have been mistating the problem.
The problem is not that OSMODE is being changed (although it does get changed, that isn't causing the problem). The problem is that regardless of what OSMODE is I frequently do not get any visual cues as to the specific point osnap has found other than the tootip showing the type of point and sometimes I don't even get that. But, that may be a result of not waiting long enough for the tooltip to appear. I apologize for not taking the time to diagnose the problem thoroughly and subsequently wasting your time.
I do not use an ACADDOC.LSP file and I have not edited the as-delivered acad2013doc.lsp (per Autodesk documentation).
I use a custom lisp file that users add to their startup suite. This file has company standard settings, autodesk-style autoload definitions for all available custom commands, and it concatenates the user's login name with "_custom.lsp" then loads and runs a file by that name which is where individual user customizations are made.
I did a search on our entire custom lisp library for occurences of "OSMODE" and I found 850 instances where either SETVAR or GETVAR are used in conjunction with "OSMODE". This is not surprising as many of the over 900 custom autolisp files created or obtained over the last 23 years will tailor OSMODE to the task at hand and then reset it to whatever it was. Only 511 of these files have our custom autoload function defined for them. The rest are either unused, rarely used, or kept as coding examples.
There is one reactor we use that gets triggered by :vlr-endDwgOpen but it does nothing with OSMODE. It collects the names of attached images and updates an "images used" list in our drawing stamp and then calls a function to set DEFAULTPLOTTOFILEPATH to match the our standard folder structure as it relates to the current drawing.
I've attached a couple of pictures showing my snap problem. Here is the macro behind my custom button that somehow fixes it: ^C^C(setvar "autosnap" 7)(setvar "osmode" 1285)
One thing stands out. You said that you did a search for Osmode. That's only half the issue if you're looking to see where it could be changed
Osmode is the PREFERRED way to change it I lisp. But someone who doesn't know lisp well could do it via the command function. The following line in a lisp file will set Osmode to end.
(command "-osnap" "end")
That is true but the changing OSMODE is apparently has little or nothing to do with my problem which is: osnap is on, points are being snapped to, but nothing on the screen tells me which point has been snapped to (I have no visual cues... see the previously attached images).
I looked at the value of Autosnap when the problem happened again today. It was set to 9766 which is not within the allowable range of 0-63. I have no idea why it is set to 9766 but just about any type of interaction with osmode or autosnap will correct it.
The value of AUTOSNAP on my system when this problem happens is 9766... (well this morning at least). I'm not sure it is always this value but something appears clearly to be wrong as the allowable range of values for AUTOSNAP is 0-63.
Another strange thing is I can accept the default presented, 9766, and AutoCAD does not complain but if I enter 9766 at the keyboard it produces the message "Requires an integer between 0 and 63." and prompts for the value again (still 9766 default).
I think at least one of these Temporary Override Keys may be the source of my Osnap problems. I deleted them and have not seen the problem again (yet). As you probably know, they are in the "Keyboard Shortcuts>Temporary Override Keys" section of the CUI. Apparently they come preset with AutoCAD (or at least C3D). I use keyboard entry more than anything else so I am sure I am hitting these key combinations all the time and have been unknowingly changing my osmode. They are supposed to be temporary overrides and I don't read macro code so I'm not sure just how my osmode gets stuck on 16384 all the time.
I also have the issue of Autosnap and Osmode changing. I can open a drawing and the settings are just fine, then re-open the drawing multiple times and it's fine but then I open again and it changes everytime I reopen. The odd part is that it's set to different numbers each time so it can't be acad.lsp or acaddoc.lsp causing it because it would be the same number each time and it would do it for every drawing I open.
This only started happening on Civil3D 2014. if I run plain Autocad 2013, it's just fine. This happens on multiple computers. I even set to straight out of the box not reading the acad.lsp or acaddoc.lsp and it still occurs.
3a8082e126