Implementing a schematic digitizing tool


Purpose
This sample shows how to implement a tool that can be used in ArcMap to digitize schematic features in schematic diagrams. This sample includes a configuration file to work with a specific type of diagram (a diagram in the DigitizingSample schematic dataset). The Extensible Markup Language (XML) configuration file can be modified to work with other schematic datasets as well.
 
This sample also shows how to use the Schematic library to create schematic features and how to use an add-in dockable window.

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/GenericDigitizing.gdb and <Your ArcGIS Developer Kit Install directory>/Samples/data/Schematics/DigitizeProperties.xml.
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.

Building the project
  1. Start Visual Studio, open the solution file, and build the project.

Adding the new tool to the ArcMap toolbar and opening the sample schematic diagram
  1. Start ArcMap and open a new empty map.
  2. Click Customize, and click Customize Mode. The Customize dialog box opens.
  3. Click the Commands tab, select the Schematic Samples category, and drag the DigitTool tool onto the Schematic Editor toolbar.
  4. Click Close on the Customize dialog box.
  5. Click Open Schematic Diagrams on the Schematic toolbar and browse to and select the Crime1 schematic diagram contained in the DigitizingSample schematic dataset in the GenericDigitizing sample geodatabase.
  6. Click Start Editing Diagram on the Schematic Editor drop-down menu.
  7. Click the schematic digitizing tool (DigitTool). The Schematic Digitize dockable window opens. This window is organized in two sections: the first section concerns the digitizing of schematic nodes, the second section concerns the digitizing of schematic links.

Digitizing schematic nodes
  1. On the Schematic Digitize dialog box's first section, click the Node Type drop-down list
  2. Choose the type of node you want to digitize in the active diagram; for this example, choose Person.
  3. Fill in the Name text box; for example, type PersonA. The name is a mandatory parameter that needs to be specified before digitizing the related node in the active schematic diagram.
  4. Click anywhere in the background of the schematic diagram. The new PersonA schematic node appears at the clicked location.

Digitizing schematic links
  1. On the Schematic Digitize dialog box's second section, click the Link Type drop-down list.
  2. Choose the type of link you want to digitize in the active diagram; for this example, choose Relation.
  3. Using the Relation Type drop-down list, specify the type of relation you want to create. This is a mandatory parameter that needs to be specified before going further. For this example, choose person-person-friend.
  4. Click two persons nodes in the active diagram. A link connecting the two clicked nodes is created.

Stopping the digitizing operations
  1. Click Stop Editing Diagram on the Schematic Editor drop-down menu.
  2. Click Yes to save the edits. The newly digitized schematic features are saved in the schematic dataset.

DigitTool.vb Class file that implements the digitizing tool.
DockableDigit.vb Class that implements the dockable window with digit properties.
Config.esriaddinx Add-in declarations in XML.
Download the VB.NET files
DigitTool.cs Class file that implements the digitizing tool.
DockableDigit.cs Class that implements the dockable window with digit properties.
Config.esriaddinx Add-in declarations in XML.
Download the C# files

Download the files for all languages

See Also:

ISchematicInMemoryFeatureClass




Development licensing Deployment licensing
ArcView: Schematics ArcView: Schematics
ArcEditor: Schematics ArcEditor: Schematics
ArcInfo: Schematics ArcInfo: Schematics