Description:
This project provides a custom snap agent which can be used to snap
to particular subtypes of feature while editing. A dockable window helps to
manage the snap agent, and a command allows you to show and hide this dockable
window. An editor extension ties all of the custom classes together.
For more information, see the Extending ArcObjects topic
CommandsAndTools Example.
Products: ArcEditor: VB6
Platforms: WindowsRequires: An edit session, data containing subtypes.Minimum ArcGIS Release: 9.0 |
How to use:
- Register the SnapAgentVB.dll and double-click the SnapAgentVB.reg file to
register the custom classes to the appropriate component categories.
(see "How to Use the Samples").
- Open ArcMap, click Tools, then Customize.
- In the Customize dialog box, select the Commands tab, and then click on
'Extending ArcObjects' in the left-hand Categories list.
- In the Commands list, select the 'SubTypesSnap Dockable Window'
command, and drag this onto the Editor toolbar below the 'Snapping' command.
Click Close to dismiss the Customize dialog box.
- Add some data from a geodatabase to ArcMap - at least one of your data layers should
contain a number of subtypes.
- Click on Editor, and select Start Editing.
- Click on Editor again, and select Snapping to display the
Snapping Environment Dockable Window. You should see the Sub Types
snap agent listed under 'Miscellaneous' in the lower half of the window.
- Click Editor once again, and click the custom 'SupTypesSnap Dockable Window'
command to show the Extended Snap Agents dockable window.
- You can now perform edits using the custom snap agent, and snap only to
those subtypes selected in the Extended Snap Agents window.
| ISubtypeSnapAgent.cls
|
Class module that defines a custom interface for the snap agent. |
| ISubtypesSnapExtension.cls
|
Class module that defines a custom interface for the snap extension. |
| ShowSnapWindow.cls
|
Class module defining a custom command which shows the snap dockable window. |
| SnapAgentVB.dll |
The compiled component. |
| SnapAgentVB.reg |
Registry export file that can be used to register the classes to the appropriate component categories. |
| SnapAgentVB.vbp |
Visual Basic project file. |
| SnapDialog.frm
|
Form containing the controls for the snap window. |
| SnapDialog.frx |
Resource file for SnapDialog.frm. |
| SnapDockableWindow.cls
|
Class module that defines the subtypes snap dockable window. |
| SnapExtension.cls
|
Class module that defines an extension for the project. |
| SubTypesSnap.cls
|
Class module that defines the subtypes snap agent. |
Download the VB6 files
Download the files for all languages
Key Libraries: Editor
Key CoClasses:Editor, FeatureCache
Key Interfaces: ISnapAgent, ISnapAgentFeedback, IRowSubtypes
Key Members:IRowSubtypes::SubtypeCode