How to use
See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample.
Data has been provided for your use with this sample. It can be found at
<Your ArcGIS Developer Kit Install directory>/Samples/data/Schematics/RemovalSample.gdb.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders.
However, you will need to update the sample to point to the location of the data once you have extracted all the files.
- Start Visual Studio, open the solution file, and build the project.
- Start ArcMap and open a new empty map.
- Click Customize and click Extension.
- Confirm that neither the Schematic Features Removal Events (C#) nor the Schematic Feature Removal Events (VBNet) extension is checked and close the Extensions dialog box.
- Open the Substation 08 schematic diagram stored in the \DeveloperKit10.0\Samples\data\Schematic\SampleRemoval.gdb\SampleRemoval_Schematic schematic dataset.
- Start an edit session on this schematic diagram.
- Select a set of schematic features in this diagram.
- Click Remove Schematic Features. The selected schematic features are graphically removed, but they are kept in the schematic feature classes.
- Close the edit session on the Substation 08 schematic diagram, and click Yes on the prompt message for saving.
- Click Update Diagram. The Update Diagram dialog box opens.
- Check the Synchronize against original selection/trace/query option and uncheck the Persist manually removed, reduced, or reconnected features option.
- Click OK. The diagram is updated and the schematic features removed in step 8 are restored and reappear in the diagram after updating.
- Click Customize and click Extension.
- Check the Schematic Features Removal Events (C#) or Schematic Feature Removal Events (VBNet) extension option and close the Extensions dialog box.
- Start an edit session on the Substation 08 schematic diagram.
- Select a set of schematic features in this diagram.
- Click Remove Schematic Features. The selected schematic features are graphically removed, but the associated records on the Inside_Nodes or Inside_Links tables from which they were queried (upon diagram generation) are also definitively removed. Updating the diagram will never restore the removed schematic features in the diagram regardless of the Persist manually removed, reduced, or reconnected features option that is used. They are no longer queried from the Inside_Nodes or Inside_Links tables because the related records have been removed.
FeatureRemovalMgmt.vb | Customization of the BeforeRemoveFeature event. |
Config.esriaddinx | Add-in declarations in XML. |
FeatureRemovalMgmt.cs | Customization of the BeforeRemoveFeature event. |
Config.esriaddinx | Add-in declarations in XML. |
Download the files for all languages
See Also:
BeforeRemoveFeature Schematic eventDevelopment licensing | Deployment licensing |
---|---|
ArcView: Schematics | ArcView: Schematics |
ArcEditor: Schematics | ArcEditor: Schematics |
ArcInfo: Schematics | ArcInfo: Schematics |