Use Snapping?

2016
5
08-01-2011 01:43 PM
GregRieck
Occasional Contributor III
Hello,

How can I programmatically tell if "Use Snapping" is enabled or disabled? I've found all kinds of help documents for server, web and engine but nothing for desktop ArcMap.

Greg
0 Kudos
5 Replies
by Anonymous User
Not applicable
Here's the intro SDK topics for snapping in ArcGIS

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Snapping_in_ArcGIS/0001...

You can see if ArcGIS Snapping is enabled via the ISnappingEnvironment.Enabled property.

You can determine which snapping environment the editor is using via the IEditProperties4.ClassicSnapping property
0 Kudos
GregRieck
Occasional Contributor III
Hi Sean,

Thanks for the reply. I did see the ISnapping Environment link however it only indicates it's available for ArcGIS Engine.
Further the Control Object Model is only found in Engine, there is no Control reference available in Desktop ArcMap.

Greg
0 Kudos
by Anonymous User
Not applicable
Hmm thanks, that page is out of date as it also refers to ArcGIS 9.4....
I'll get that fixed. The installed SDK help is correct.

Anyway, its available in desktop too. You can reference the ESRI.ArcGIS.Controls assembly in desktop apps.
0 Kudos
GregRieck
Occasional Contributor III
Sean,

Yes, I added the reference and it's working fine. It's just odd to go to the Engine(Core) to get a reference for use with a Desktop application.
0 Kudos
CARLOSGARCIA
New Contributor
Hello all,
Here is a situation:
Visual Studio 2010, ArcEngine 10.1
Create a mapcontrol application
Add edit and snappingg toolset
Start Editing
Doesn't work any snap

Any ideas? Does I need to do sometthing extra? Also notice that IEditProperties4.ClassicSnapping it's only for desktop

Regards,

Carlos Garcia
0 Kudos