Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Autosnap setting invalid (9766) - visual snap cues gone

19 REPLIES 19
SOLVED
Reply
Message 1 of 20
hencoop
982 Views, 19 Replies

Autosnap setting invalid (9766) - visual snap cues gone

Hello all,

I have 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 have made a toolbar button that quickly resets the osmode to what I wish I could make the default but not having to use this button at all would be great.

Does anyone know why my osnaps are being reset to the useless settings I have described?

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
19 REPLIES 19
Message 2 of 20
doni49
in reply to: hencoop

It sounds like someone has created an autolisp routine that runs when you open a drawing.  Ask your cadd manager if there is one.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 3 of 20
hencoop
in reply to: doni49

Thanks Don,

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.

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 4 of 20
doni49
in reply to: hencoop


@hencoop wrote:

Thanks Don,

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.


What about your predecessor?  Maybe there's still a routine from his set up that's still running?

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.

 

If you're saying that you create a file and change these settings but the next time you create a file they've reverted, then that's your problem.  Open the template file and change the settings there.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 5 of 20
hencoop
in reply to: doni49

No, I'm saying every time I open a drawing. They are not new drawings.


Edited by
Discussion_Admin

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 6 of 20
doni49
in reply to: doni49


@doni49 wrote:
OSMode is stored in the dwg file.

I have to correct myself.  I just did some testing and no it's not stored in the dwg as I've always been told (I've never worried about it because the cadd manager has a lisp routine that resets it to a default setting everytime you open a dwg file -- each user has their own default setting though).
 

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 7 of 20
AllenJessup
in reply to: hencoop

Do you use an acaddoc.lsp? I load it with every drawing and set all the variables that I want to make sure are correct when I open a drawing. He're what I have.

 

(SETVAR "AUTOSNAP" 5)
(SETVAR "OSMODE" 1)
(SETVAR "OSNAPNODELEGACY" 1)
(SETVAR "CMDDIA" 1)
(SETVAR "FILEDIA" 1)
(SETVAR "PICKFIRST" 1)
(SETVAR "PLINEGEN" 1)
(SETVAR "VISRETAIN" 1)
(SETVAR "INSUNITS" 2)
(SETVAR "INSUNITSDEFSOURCE" 2)
(SETVAR "INSUNITSDEFTARGET" 2)
(SETVAR "GEOMARKERVISIBILITY" 0)
(SETVAR "SKPOLY" 1)
(SETVAR "COORDS" 2)
(SETVAR "DYNMODE" 1)
(SETVAR "DYNPIFORMAT" 1)
(SETVAR "DYNPICOORDS" 1)

 

So my Osmode is set to 1 [endpoint] every time I open a drawing. It you're changes to the same thing every time you open a drawing. There may be an acaddoc.lsp file changing it.

 

 

Allen Jessup

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.

EESignature

Message 8 of 20
hencoop
in reply to: AllenJessup

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)

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 9 of 20
doni49
in reply to: hencoop

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



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 10 of 20
hencoop
in reply to: doni49

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

 

A search for osnap" turned up no commands in any of the 976 lisp files in our library... nobody here except me knows or does anything about autolisp or any other program language.

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 11 of 20
hencoop
in reply to: hencoop

Given my acknowledgement that I mistated the problem and my restatement of it perhaps the title of this thread should be changed.  Who does that or can it be done?

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 12 of 20
doni49
in reply to: hencoop

If you want to have the subject changed (and I can't promise that it can be done), the person to ask would be "discussion_admin". Send a private message containing a link to the thread.

.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 13 of 20
doni49
in reply to: hencoop

There's a setting that controls the size of the snap box. I don't remember off the top of my head what this. I'll look when I get back to office in the morning.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 14 of 20
Jay_B
in reply to: hencoop

That green square in your screen shot is the "Autosnap Marker" which is controlled by the AUTOSNAP System Variable.

 

Autosnap Marker.PNG

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
Message 15 of 20
AllenJessup
in reply to: hencoop

And this is a description of the the SYSVAR that the Marker box sets.

 

marker2.png

 

Allen

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.

EESignature

Message 16 of 20
hencoop
in reply to: Jay_B

I've been over those settings without finding any cause there.

 

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.

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 17 of 20
hencoop
in reply to: AllenJessup

I think I've found the cause but not the cause of the cause.

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

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 18 of 20
hencoop
in reply to: doni49

Admin contacted me by private message.  Thanks for the info.

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 19 of 20
hencoop
in reply to: AllenJessup

Allen, Jay, Don:

 

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.
 

Key(s):	SHIFT+D
Name:	Enables Object Snap Enforcement
Macro 1 (Key Down):	^P$M=$(if,$(and,$(getvar,osmode),16384),'_.osmode $(-,$(getvar,osmode),16384) )$(if,$(eq,$(getvar,osnapoverride),0),'_.osnapoverride 1)

Key(s):	SHIFT+;
Name:	Enables Object Snap Enforcement
Macro 1 (Key Down):	^P$M=$(if,$(and,$(getvar,osmode),16384),'_.osmode $(-,$(getvar,osmode),16384) )$(if,$(eq,$(getvar,osnapoverride),0),'_.osnapoverride 1)

Key(s):	SHIFT+X
Name:	Toggles Polar Mode
Macro 1 (Key Down):	^P'_.autosnap $M=$(if,$(and,$(getvar,autosnap),8),$(-,$(getvar,autosnap),8),$(+,$(getvar,autosnap),8)) 

Key(s):	SHIFT+.
Name:	Toggles Polar Mode
Macro 1 (Key Down):	^P'_.autosnap $M=$(if,$(and,$(getvar,autosnap),8),$(-,$(getvar,autosnap),8),$(+,$(getvar,autosnap),8)) 

Key(s):	SHIFT+Q
Name:	Toggles Object Snap Tracking Mode
Macro 1 (Key Down):	^P$M=$(if,$(and,$(getvar,autosnap),16),,$(if,$(and,$(getvar,osmode),16384),'_.osmode $(-,$(getvar,osmode),16384) ))'_.autosnap $(if,$(and,$(getvar,autosnap),16),$(-,$(getvar,autosnap),16),$(+,$(getvar,autosnap),16)) 

Key(s):	SHIFT+]
Name:	Toggles Object Snap Tracking Mode
Macro 1 (Key Down):	^P$M=$(if,$(and,$(getvar,autosnap),16),,$(if,$(and,$(getvar,osmode),16384),'_.osmode $(-,$(getvar,osmode),16384) ))'_.autosnap $(if,$(and,$(getvar,autosnap),16),$(-,$(getvar,autosnap),16),$(+,$(getvar,autosnap),16)) 

Key(s):	F11
Name:	Toggles Object Snap Tracking Mode
Macro 1 (Key Down):	^P$M=$(if,$(and,$(getvar,autosnap),16),,$(if,$(and,$(getvar,osmode),16384),'_.osmode $(-,$(getvar,osmode),16384) ))'_.autosnap $(if,$(and,$(getvar,autosnap),16),$(-,$(getvar,autosnap),16),$(+,$(getvar,autosnap),16)) 

Key(s):	F10
Name:	Toggles Polar Mode
Macro 1 (Key Down):	^P$M=$(if,$(and,$(getvar,autosnap),16),,$(if,$(and,$(getvar,osmode),16384),'_.osmode $(-,$(getvar,osmode),16384) ))'_.autosnap $(if,$(and,$(getvar,autosnap),16),$(-,$(getvar,autosnap),16),$(+,$(getvar,autosnap),16)) 

 

 

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Ver.: 13.6.1781.0 Civil 3D 2024.3 Update
Built On:        U.152.0.0 AutoCAD 2024.1.2
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 20 of 20
cclemens
in reply to: hencoop

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.

Tags (2)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report