Add Collapse Container By Category Rule (Network Diagram Tools)
Summary
Adds a diagram rule to automatically collapse container contents during the building of diagrams based on an existing template. The collapse depends on whether the containers are tagged with specific network categories.
This tool is a configuration and administration tool.
Note:
This tool impacts the consistency of any existing diagrams based on the input diagram template. All of the existing diagrams become inconsistent and open with a consistency warning icon until they are updated.
Usage
This tool is not supported when working with a utility network service. You must use either a utility network in a file or mobile geodatabase, or a database connection to a utility network in an enterprise geodatabase. When working with an enterprise geodatabase, the following are requirements:
This tool must be connected to the default version, which is expected to be public and not protected.
The Collapse Container rule is used to simplify diagrams by collapsing all contents related to containers that may exist in diagrams.
This tool allows you to configure the Collapse Container rule to run by network categories. This means that you can configure the collapse of network containers in the generated diagrams depending on whether they are tagged with specific network categories.
The utility network containing the diagram template that will be modified.
Utility Network
Input Diagram Template
The name of the diagram template that will be modified.
String
Active
Specifies whether the rule will be enabled when generating and updating diagrams based on the specified template.
Checked—The added rule will become enabled during the generation and update of any diagrams based on the input template. This is the default.
Unchecked—The added rule will not become enabled during the generation or update of any diagrams based on the input template.
Boolean
Container Type
Specifies the geometry type of the container element the rule will process.
Junctions only—Only junction and junction object containers will be processed.
Edges only—Only edge and edge object containers will be processed. Only the linear container will be processed
Both junctions and edges—All container features and objects will be processed regardless of their type. Both junction and edge types will be processed. This is the default
String
Rule Process
Specifies how the containers that are tagged with the specified network categories will be processed.
Exclude categories—Containers that are tagged with the specified network categories will not be collapsed, while other containers will be collapsed. This is the default.
Include categories—Containers that are tagged with the specified network categories will be collapsed.
String
Categories
The network categories that will be excluded or included depending on the Rule Process parameter value.
If the Rule Process parameter is set to Include categories, one or more network categories must be specified. All containers that are tagged with the specified categories will be collapsed in the generated diagrams.
If the Rule Process parameter is set to Exclude categories, the contents related to any containers that are tagged with the specified categories will not be collapsed in the generated diagrams, while contents related to containers that are not tagged with the specified categories will be collapsed.
String
Aggregate reconnected edges
(Optional)
Specifies whether edges that are reconnected to the collapsed junctions will be aggregated.
Checked—Any edge connecting a content junction will be replaced by a reduction edge that is reconnected to the collapsed container junction. Multiple edges between two collapsed junctions will be systematically aggregated under the same reduction edge. This is the default.
Unchecked—Any edge connecting a content junction will be kept and reconnected to the collapsed container junction.
The utility network containing the diagram template that will be modified.
Utility Network
template_name
The name of the diagram template that will be modified.
String
is_active
Specifies whether the rule will be enabled when generating and updating diagrams based on the specified template.
ACTIVE—The added rule will become enabled during the generation and update of any diagrams based on the input template. This is the default.
INACTIVE—The added rule will not become enabled during the generation or update of any diagrams based on the input template.
Boolean
container_type
Specifies the geometry type of the container element the rule will process.
JUNCTIONS—Only junction and junction object containers will be processed.
EDGES—Only edge and edge object containers will be processed. Only the linear container will be processed
BOTH—All container features and objects will be processed regardless of their type. Both junction and edge types will be processed. This is the default
String
inverse_category_selection
Specifies how the containers that are tagged with the specified network categories will be processed.
EXCLUDE_CATEGORIES—Containers that are tagged with the specified network categories will not be collapsed, while other containers will be collapsed. This is the default.
INCLUDE_CATEGORIES—Containers that are tagged with the specified network categories will be collapsed.
String
category[category,...]
The network categories that will be excluded or included depending on the inverse_category_selection parameter value.
If the inverse_category_selection parameter is set to INCLUDE_CATEGORIES, one or more network categories must be specified. All containers that are tagged with the specified categories will be collapsed in the generated diagrams.
If the inverse_category_selection parameter is set to EXCLUDE_CATEGORIES, the contents related to any containers that are tagged with the specified categories will not be collapsed in the generated diagrams, while contents related to containers that are not tagged with the specified categories will be collapsed.
String
reconnected_edges_option
(Optional)
Specifies whether edges that are reconnected to the collapsed junctions will be aggregated.
AGGREGATE_RECONNECTED_EDGES—Any edge connecting a content junction will be replaced by a reduction edge that is reconnected to the collapsed container junction. Multiple edges between two collapsed junctions will be systematically aggregated under the same reduction edge. This is the default.
DONT_AGGREGATE_RECONNECTED_EDGES—Any edge connecting a content junction will be kept and reconnected to the collapsed container junction.
Boolean
description
(Optional)
The description of the rule.
String
Derived output
Name
Explanation
Data type
out_utility_network
The updated utility network.
Utility Network
out_template_name
The name of the diagram template.
String
Code sample
AddCollapseContainerByCategoryRule example (stand-alone script)
Add a Collapse Container rule to the MyTemplate1 template to collapse all linear containers with the category 'Duct Bank' using the AddCollapseContainerByCategoryRule function.