Implementing schematic containers around schematic features


Purpose
This sample demonstrates the implementation of schematic containers. It uses the AfterLoadDiagram procedure to define relations between schematic features contained in a diagram.
The schematic diagrams contains Stations and Containers features. For the Stations schematic feature class, the RelatedFeeder schematic attribute has been created using the Schematic Dataset Editor. This attribute is used in the AfterLoadDiagram procedure to identify the schematic container related to each station contained in the diagram.
This sample shows how schematic relations and containers can be managed by custom code; however, schematic containers can also be configured in schematic diagrams without developing custom code when configuring the PEN and PTN predefined schematic attributes.

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/ContainerSample.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.

  1. Start Visual Studio, open the solution, and build the project.
  2. Navigate to the ContainerSample.gdb sample geodatabase, located by default at <ArcGIS DeveloperKit install location>\Samples\data\Schematics and copy this geodatabase in a folder for which you have full rights.
  3. Start ArcMap and open a new empty map.
  4. Click Customize and click Extensions. The Extensions dialog box opens.
  5. Confirm that neither the Implementation of Schematic Containers (VBNet) nor Implementation of Schematic Containers (C#) extension is checked, and close the Extensions dialog box.
  6. Click Open Schematic Diagrams on the Schematic toolbar. The Select Schematic Diagrams To Open dialog box opens.
  7. Browse and select the All schematic diagram contained in the ContainerSample_Schematic schematic dataset in the ContainerSample.gdb you copied at step#2.
  8. Start an edit session on the All schematic diagram.
  9. Right-click the Containers feature layer entry in the TOC under the All schematic diagram layer, click Selection, then click Select All. Three schematic features containers are selected in the diagram.
  10. Click Selection on the ArcMap menu and click Clear Selected Features.
  11. Close the edit session on the All schematic diagram. If you are prompted to save, click No.
  12. Click Customize and click Extensions. The Extensions dialog box opens.
  13. Check the Implementation of Schematic Containers (VBNet) or Implementation of Schematic Containers (C#) extension (depending on the language you're using) and close the Extensions dialog box.
  14. Start an edit session on the All schematic diagram. The Containers schematic features now display around the Stations schematic features to which they are related.
  15. Stop the edit session. If you are prompted to save, click No.

StationsInContainers.vb Initialization of the containers.
Download the VB.NET files
StationsInContainers.cs Initialization of the containers.
Download the C# files

Download the files for all languages

See Also:

ISchematicContainerManager interface
ISchematicRelationManager interface




Development licensing Deployment licensing
ArcGIS for Desktop Basic: Schematics ArcGIS for Desktop Basic: Schematics
ArcGIS for Desktop Standard: Schematics ArcGIS for Desktop Standard: Schematics
ArcGIS for Desktop Advanced: Schematics ArcGIS for Desktop Advanced: Schematics