Exercise 2: Configuring schematic rules

Complexity: Advanced Data Requirement: ArcGIS Tutorial Data for Desktop Data Path: C:\ArcGIS\ArcTutor\Schematics\ and C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data Goal: Getting acquainted with schematic rules and their configuration on the schematic diagram templates

Schematic rules are very useful for automatically adding or removing things from diagrams. For example, in a utility network, there are often types of equipment that users do not want to see in their schematic diagrams. So ArcGIS Schematics has a node reduction by priority rule that allows those items to be reduced, and the links that connect them are turned into superspans that connect to the next items. Another example might be a social network where things are related to each other via relationship classes in the geodatabase. Here, you might want to allow the user to just select one thing on the map and have Schematics use the relationship class information to automatically add the related items to the diagram. For this, you would use the relationship rule in Schematics. There are several other rules, all built for certain purposes. Consult the help files for more information on each of the rules available.

In this exercise, you will work with two different rules and do the following tasks:

NoteNote:

Exercise 1 of the Schematics Advanced Configurations Tutorial is a prerequisite to this exercise. You will be building on what was already configured in exercise 1.

Creating and configuring a node reduction rule

Start by creating and configuring a node reduction rule to remove the pipelines_Net_Junctions nodes that are in the diagrams. Net junctions are part of geometric networks, but not of the real-world equipment. So you want to get rid of them where it makes sense.

Steps:
  1. Start ArcCatalog.
  2. Browse to and choose the root AdvancedSchematicDB geodatabase that should be found in C:\ArcGIS\ArcTutor\Schematics.
  3. Right-click the AdvancedSchematic schematic dataset that is within this geodatabase and choose Edit Edit schematic dataset button from the context menu.

    The Schematic Dataset Editor dialog box appears.

  4. Click the BrazilTemplate entry in the Schematic Dataset Editor tree if it is not already selected.
  5. Click the Rules tab on the right side of the editor window.
  6. Click the Add Rule button Add button.

    Node Reduction By Priority happens to be the default rule in the Type drop-down list, and this is the rule that you want to use. You can use the drop-down list to see the other available rules.

    Rules tab—Initial content

  7. Click the Rule Properties button Rules Properties button to open the Node reduction by priority rule attributes tab, where you will finish the configuration.
  8. Type Remove Junctions in the Description text box.
  9. Select pipelines_Net_Junctions in the Select the schematic class to reduce drop-down list.
  10. Choose the Connection constraint option.

    Reduce nodes with 0 connections and Reduce nodes with 2 connections are checked by default.

    Node reduction rule properties page—Final

  11. Click OK.
  12. Click the Save button Save icon on the Schematic Dataset Editor toolbar.

Testing the node reduction by priority rule

Steps:
  1. Open the Brazil.mxd file using ArcMap.

    This file is located in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.

  2. Click the Open Schematic Diagrams button Open schematic diagrams button on the Schematic toolbar to open the Select Schematic Diagrams To Open dialog box.
  3. Browse to and choose the diagram named TestDiagram from the AdvancedSchematic schematic dataset, which is located in the AdvancedSchematicDB geodatabase in C:\ArcGIS\ArcTutor\Schematics.

    TestDiagram selected

  4. Click the Add button to open this diagram in the map.

    Notice that at this point nothing has changed. Rules are only applied during diagram generation or update.

  5. Right-click the pipelines_Net_Junctions layer that belongs to the TestDiagram schematic layer and choose Selection > Select All.
  6. Click the List By Selection button List By Selection icon on the toolbar for the Table Of Contents window.

    Note the number of pipelines_Net_Junctions features currently in the diagram.

    TestDiagram—Selected junctions

  7. Click the Clear Selected Features button Clear Selected icon on the Tools toolbar.
  8. Click the List By Drawing Order button List By Drawing Order icon on the toolbar for the Table Of Contents window.
  9. Click the Schematic arrow on the Schematic toolbar and click Update Diagram Update Diagram icon to open the Update Diagram dialog box.

    Update Diagram dialog box

  10. Click OK.
  11. Right-click the pipelines_Net_Junctions layer that belongs to the TestDiagram schematic layer and choose Selection > Select All.
  12. Click the List By Selection button List By Selection icon on the toolbar for the Table Of Contents window.

    Note the number of pipelines_Net_Junctions features currently in the diagram. This number should be significantly reduced. Your screen capture may not exactly match this one, depending on what your initial selection was when you generated the TestDiagram schematic diagram.

    TestDiagram—Selected junctions after reduction
  13. Close ArcMap and choose No if prompted to save.

Creating and configuring a relationship rule

There is already a relationship class in the Brazil data you have been using. The class exists between the pug_PUG_gas_plants feature class and the pug_PUG_electric feature class. Since pug_PUG_electric is not part of the geometric network, it was not imported when you ran the import from feature layers earlier. Start by importing that layer.

Steps:
  1. Switch to the Schematic Dataset Editor application.
  2. Right-click the BrazilTemplate entry in the Schematic Dataset Editor tree and choose Import From Feature Layers from the context menu.

    This opens the Import From Feature Layers dialog box.

  3. Click the ellipsis (...) button at the end of the Map or Layer File input area.

    This opens the Select a map or layer file to import dialog box.

  4. Use this dialog box to navigate to and select the Brazil.mxd file that is found in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.
  5. Click the Add button to close the dialog box and update the Import From Feature Layers dialog box.
  6. Click the Clear All button to remove all the selected items, since you already imported those in exercise 1.
  7. Check the check box next to electric.

    Import From Feature Layers dialog box

  8. Click OK to close this dialog box.

    A new pug_PUG_electric schematic feature class is displayed in the Schematic Dataset Editor tree.

    New pug_PUG_electric schematic feature class

  9. Click Save Save icon on the Schematic Dataset Editor toolbar.
  10. Click the BrazilTemplate entry in the Schematic Dataset Editor tree and click the Rules tab.
  11. Click the Add Rule button Add button.
  12. Use the Type drop-down list to choose Relationship.

    Relationship rule on the Rules tab

  13. Click the Rule Properties button Rules Properties button to open the Relationship rule attributes tab, where you will finish the configuration.
  14. Type Gas to Electric in the Description text box.
  15. Use the Select a source drop-down list to choose pug_PUG_gas_plants.

    When setting these options, you have to think in terms of what the map user will be doing. In this case, the map user will be selecting a gas plant, and the rule will automatically add the electric plants related to it. So pug_PUG_gas_plants will be the source here. The system sees that there is a relationship class in the geodatabase between pug_PUG_gas_plants and pug_PUG_electric, so it automatically fills in some information for you.

    Relationship Properties dialog box—Intermediate state

  16. In the Relations section, check the check box for Create links.

    The system adds the electric features and draws links from the gas plants to the electric so they are logically connected, even though they are not physically connected by the geometric network.

    Relationship Properties dialog box—Intermediate final state

  17. Click OK.
  18. Click Save Save icon on the Schematic Dataset Editor toolbar.

Testing the relationship rule

Steps:
  1. Start ArcMap and load the Brazil.mxd file.

    This file is located in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.

  2. Click the Open Schematic Diagrams button Open schematic diagrams button on the Schematic toolbar to open the Select Schematic Diagrams To Open dialog box.
  3. Browse to and choose the diagram named TestDiagram from the AdvancedSchematic schematic dataset, which is located in the AdvancedSchematicDB geodatabase in C:\ArcGIS\ArcTutor\Schematics.
  4. Click the Add button to open this diagram in the map.

    Notice that at this point nothing has changed. Rules are only applied during diagram generation or update. Notice also that there are no electric plants currently on this diagram.

    TestDiagram before relationship rule execution

  5. Click the Schematic arrow on the Schematic toolbar and choose the Update Diagram Update Diagram icon command.
  6. Click OK on the Update Diagram dialog box.

    You should now have two new lines connecting from the gas plants that were already on the diagram to the new electric plant that has been added because of the relationship rule.

    TestDiagram after relationship rule, with added lines

  7. Close ArcMap and choose No on any dialog boxes prompting you to save.

Modifying the dataset and relationship rule so it shows containers instead of lines

You will make a few small changes so you can see this relationship via the use of containers. Since the electric station feeds power to both gas plants, draw the electric station as a container that contains both its related gas plants. When you imported the pug_PUG_electric feature layer, it came in as a node with point geometry. This won't work for containers. A container needs to be a polygon or a polyline. So you have to also fix this.

Steps:
  1. Switch to the Schematic Dataset Editor application.
  2. Expand the BrazilTemplate entry in the Schematic Dataset Editor tree so you can see all the schematic feature classes associated with this diagram template.
  3. Right-click pug_PUG_electric and choose Delete from the menu.

    Context menu for pug_PUG_electric

  4. Click Yes on the delete message.
  5. Click Save Save icon on the Schematic Dataset Editor toolbar.

    Now you have to reimport the layer.

  6. Right-click the BrazilTemplate entry in the Schematic Dataset Editor tree and choose Import From Feature Layers from the context menu.

    This opens the Import From Feature Layers dialog box.

  7. Click the ellipsis (...) button at the end of the Map or Layer File input area.

    This opens the Select a map or layer file to import dialog box.

  8. Use this dialog box to navigate to and select the Brazil.mxd file that is found in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.
  9. Click the Add button, which will close the dialog box and update the Import From Feature Layers dialog box.
  10. Click the Clear All button to remove all the selected items, since you already imported those in exercise 1.
  11. Check the check box next to electric.

    Import From Feature Layers dialog box

  12. Click OK to close this dialog box.

    This time, you will be careful not to save, as you have to modify the schematic feature class so that it has a geometry of a polygon instead of a point.

  13. Select the pug_PUG_electric entry in the Schematic Dataset Editor tree.
  14. On the Properties tab on the right side of the editor window, change Geometry to Polygon.

    pug_PUG_electric changed to polygon

  15. Click Save Save icon on the Schematic Dataset Editor toolbar.
  16. Select the BrazilTemplate entry in the Schematic Dataset Editor tree.
  17. Click the Rules tab.
  18. Select the second line, the relationship rule, so that it is the active row.
  19. Click the Rule Properties button Rule Properties button on the Rules tab.
  20. Check the check box for Relate source and target schematic features.
  21. Check the check box for Reverse relation.

    You want the electric plant to be the parent or container here, but it is the target in the rule, so you have to reverse the relationship. Again, this is because users will think about selecting the gas plants, not the electric plants. It could be done the other way around, though.

  22. Uncheck the Create links check box.

    Relationship rule properties—Final

  23. Click OK.
  24. Click Save Save icon on the Schematic Dataset Editor toolbar.
  25. Close the Schematic Dataset Editor dialog box.

Testing the relationship rule changes

Steps:
  1. Start ArcMap and load the Brazil.mxd file.

    This file is located in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.

  2. Click the Open Schematic Diagrams button Open schematic diagrams button on the Schematic toolbar to open the Select Schematic Diagrams To Open dialog box.
  3. Browse to and select the diagram named TestDiagram from the AdvancedSchematic schematic dataset, which is located in the AdvancedSchematicDB geodatabase in C:\ArcGIS\ArcTutor\Schematics.
  4. Click the Add button to open this diagram in the map.

    Notice that at this point, nothing has changed. Rules are only applied during diagram generation or update. You still see the electric plant with links connected to the gas plants.

  5. Click the Schematic drop-down list on the Schematic toolbar and choose the Update Diagram Update Diagram icon command.
  6. Click OK on the Update Diagram dialog box.

    You should now have a container that represents the electric plant going around both gas plants:

    TestDiagram with relationship—Polygon
    The interesting thing with containers is that during editing, the containers add some functionality. If you move the container, its contents automatically move with it. If you move the contents, the container automatically resizes to fit its contents.

  7. Close ArcMap and choose No on any dialog boxes prompting you to save.
  8. Close ArcCatalog.
2/10/2012