Exercise 3: Configuring schematic layout algorithms
In this exercise, you will become familiar with configuring schematic layout algorithms. You will learn about how to do the following:
- Make them visible or not for schematic diagrams based on a given diagram template.
- Make them editable or not for diagrams based on a given diagram template.
- Configure the order in which the algorithms are displayed to the ArcMap user.
- Configure their default parameters per diagram template.
- Configure a schematic layout algorithm to be automatically applied when a diagram is generated/updated
Exercise 1 of the Schematics Advanced Configurations Tutorial is required for this exercise. We will be building on what was already configured in Exercise 1.
Edit the schematic dataset
- Open ArcCatalog.
- Browse to and select the schematics tutorial directory, C:\ArcGIS\ArcTutor\Schematics\.
- Double-click the AdvancedSchematicDB geodatabase to expose the AdvancedSchematic schematic dataset that is inside.
Right-click the AdvancedSchematic schematic dataset and choose Edit from the pop-up menu.
This starts the Schematic Dataset Editor application.
- Select the BrazilTemplate diagram template in the Schematic Dataset Editor's tree if it is not already selected.
Click the Layouts tab on the right side of the Editor Window.
This tab shows a list of all registered algorithms. If you have registered custom algorithms, they will appear in this list.
Setting the visibility of schematic algorithms
In some cases, you may want to change the list of algorithms available to your end users in ArcMap. This reduces the number of options available and the training of each algorithm's usage and so on. Maybe you have developed and implemented your own algorithm and would like that to be the only option available for a particular diagram template. The available list of algorithms is on a template-by-template basis. If you have multiple diagram templates in a schematics dataset, one may have all algorithms available and one may only have a few available.
Uncheck the Visible check boxes for all algorithms except the ones that start with Hierarchical.
Setting the ability for a user to edit the algorithm parameters
In some cases, you may want to configure the dataset so that the ArcMap user can't change the layout algorithm properties. Maybe you need to enforce some sort of consistency so that anytime a user applies a certain algorithm, it always uses the same properties.
Uncheck the Editable check box for the Hierarchical - Compact Tree entry.
Setting the order in which the layout algorithms are displayed to the ArcMap user
In some cases, you may want to change the order so that the more commonly used algorithms are at the top of the list.
- Select the row for Hierarchical - Smart Tree.
Click the Move Up arrow at the top of the list three times so that Hierarchical - Smart Tree displays above Hierarchical - Compact Tree.
Setting default algorithm properties
In some cases, you may want to set the default algorithm properties. Because the algorithms are generic in nature, the default parameters that work for one customer or situation may not work in another. So you can set the defaults to be more appropriate for your situation.
Click the Layout Properties button at the top of the list to open the Layout Properties dialog box.
Since the Hierarchical - Smart Tree was selected in the previous steps, that is the property page now seen. What you see on this page are the default property settings for this layout algorithm. If you did nothing else, these are what the ArcMap user would also see.
- Uncheck the Absolute units check box.
When this box is unchecked, the distance parameters are interpreted as relative units to the average of the current symbol sizes used to represent the schematic nodes in the diagrams. When it is checked, they are interpreted as absolute distances determined by the coordinate system specified on the XY Coordinate System tab of the Schematic Diagram Properties dialog box. Working with relative units is interesting when a reference scale is specified for your diagrams. Besides, when a default reference scale is set for the diagram template using the Import Default Symbology function, the absolute parameters are unchecked by default for all schematic layout algorithms available for this diagram template.
Set the Direction option to be From top to bottom.
Anytime an ArcMap user selects and applies the Hierarchical - Smart Tree without editing the properties, they would get a tree that has the starting point at the top of the diagram.
- Click the OK button.
Configuring so that a particular algorithm is automatically applied when generating/udpating a diagram
In some cases, you may want to have the system automatically apply an algorithm when the user generates/updates a diagram. This again can help in cases where consistency is needed. Anytime a user generates a diagram of a certain diagram template, they can force it to run a layout algorithm.
This algorithm is only applied until a diagram has been saved. Once a diagram has been saved, the algorithm is no longer automatically applied so that the user modifications are not lost each time it is opened.
- Click the Properties tab on the right side of the Editor Window.
Use the Layout drop-down list to select Hierarchical - Compact Tree.
You can also change the properties for this layout algorithm by clicking the Layout Properties button next to the list. The properties for the layout that will be automatically applied can be different than the layout properties that are defined for the same layout algorithm on the Layouts tab.
- Click the Save button on the Schematic Dataset Editor toolbar.
- Close the Schematic Dataset Editor.
Testing the layout algorithm changes
Open the Brazil.mxd file using ArcMap.
This file is located in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Mixed_Data.
- Use the Select Features tool to select everything in the current view..
Click the Generate New Schematic Diagram button on the Schematic toolbar.
This opens the New Schematic Diagram dialog box.
Click the browse button next to the Schematic Dataset or Folder drop-down list.
This opens the Select schematic dataset or schematic folder dialog box.
- Use this dialog box to browse to and select the AdvancedSchematic schematic dataset in the AdvancedSchematicDB geodatabase located at C:\ArcGIS\ArcTutor\Schematics\.
Click the Add button.
Since the configuration only has one diagram template (BrazilTemplate), it is automatically selected in the Schematic Diagram Template section.
Type TestLayoutAlgos in the Schematic Diagram Name text box.
Click the OK button.
You should see that the diagram has been laid out in a Hierarchical - Compact Tree layout because that is what is set as the default for the diagram template.In the Schematic Editor toolbar, the layout task is also set to Hierarchical - Compact Tree.
Click the Schematic Editor drop-down on the Schematic Editor toolbar and select Start Editing Diagram from the menu.
This enables the rest of the controls so you can check the other changes.
Notice that the Layout Properties button is disabled for the Hierarchical - Compact Tree algorithm.
This is because you unchecked the Editable check box for this layout algorithm.
Open the Layout Task drop-down list.
You should only see four algorithms available in this list, because those are the only four with Visibility checked for this diagram template. Also notice that Hierarchical - Smart Tree shows up in the list above Hierarchical - Compact tree because you changed the order.
- Select Hierarchical - Smart Tree in the Layout Task drop-down list.
Click the Layout Properties button .
Notice that the default Direction value is set to From top to bottom as you configured.
- Click the Cancel button on the Schematic Layout Algorithm dialog box.
- Close ArcMap and ArcCatalog and click No to any save dialog boxes.