.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Save and restore osnap preferences

2 REPLIES 2
Reply
Message 1 of 3
davidgarner
458 Views, 2 Replies

Save and restore osnap preferences

I can't figure out how to save and/or restore osnap preferences. As well as dynamically turn snaps on and off.


I've found the osnapmasks enumeration, but I can't find any methods or properties that use these masks in the Object Browser. Am I missing something? Any hints on where I should be looking?
2 REPLIES 2
Message 2 of 3
dmarcotte4
in reply to: davidgarner

look at
GetSystemVariable("OSMODE")
SetSystemVariable("OSMODE" , val)

Dan Message was edited by: Danielm
Message 3 of 3
davidgarner
in reply to: davidgarner

Perfect, that's it. I overlooked the OSMODE variable thinking it had to do with "Operating System".

Too bad you can't use the ObjectSnapMasks directly in the
SetSystemVariable() function, but instead it needs to be cast to and Int16 object.

Thanks for the direction. All is well.

Something good is going to happen to you today.

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost