Select to view content in your preferred language

SNAP_ON for selected feature

2007
0
08-10-2010 09:13 PM
shivagugila
Deactivated User
Hi All,

I have a code in VBA that is written to activate snap agent (SNAP ON), when a feature is selected from a map(with many Feature layers). Can any one help in resolving the following issues.

1. Each time a feature is selected, a new snap agent gets added to the snapwindow. how to restrict
a new snapagent being added.

pSnapEnvironment.AddSnapAgent pFeatureSnapagent

2. My shape files data is added from d:\temp, so the following code is used.What is the line of code, to set workspace of
selected feature.

Set pfworkspace = pwsfactory.OpenFromFile("D:\TEMP", 0)
pEditor.StartEditing pfworkspace

3. What line of code to add to check if specific snap agent already exist.

pFeatureSnapagent.HitType = esriGeometryPartVertex

above given lines that are used in my code are for your reference. any sort of help is highly appreciated.Thanks in advance.
0 Kudos
0 Replies