Add Remove Feature By Category Rule (Network Diagram Tools)
Summary
Adds a diagram rule to automatically remove diagram features during diagram building based on an existing template. This removal depends on whether the diagram features are tagged with specific network categories. You can also constrain the removal of features based on connectivity.
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.
Caution:
This tool is a configuration and administration tool.
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 Remove Feature rule is used to remove specific network features or network objects represented in diagrams. This tool allows you to configure the Remove Feature rule to run by network categories. This means that you can configure the removal of network features and network objects from 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
Source Type
Specifies the geometry type of the network elements that will be processed.
Junctions only—Only junction features or junction objects (network polygon source classes, network point source classes, or junction object tables) will be processed.
Edges only—Only edge features or edge objects will be processed
Both junctions and edges—Both junction and edge types will be processed. This is the default.
String
Rule Process
Specifies how the network features or network objects that are tagged with the specified network categories will be processed.
Exclude categories—Network features and objects that are tagged with the specified network categories will not be removed, while any other network features and objects will be removed. This is the default.
Include categories—Network features and objects that are tagged with the specified network categories will be removed.
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 network features and objects that are tagged with the specified categories will be removed from the generated diagrams.
If the Rule Process parameter is set to Exclude categories, the network features and objects that are tagged with the specified categories will not be removed from the generated diagrams, while network features and objects that are not tagged with the specified categories will be removed.
String
Junctions must be unconnected
Specifies whether diagram junction and diagram container candidates must be unconnected to be removed.
Note:
This parameter is only enabled when the Source Type parameter is set to Junctions only.
Checked—Diagram junction and diagram container candidates must be unconnected to be removed.
Unchecked—Neither diagram junction nor diagram container candidates need to be unconnected to be removed. This is the default.
Boolean
Junctions must be connected to a single junction
Specifies whether diagram junction and diagram container candidates must be connected to a single diagram junction or diagram container to be removed.
Note:
This parameter is only enabled when the Source Type parameter is set to Junctions only.
Checked—Diagram junction and diagram container candidates must be connected to a single diagram junction or diagram container to be removed.
Unchecked—Neither diagram junction nor diagram container candidates need to be connected to a single diagram junction or diagram container to be removed. This is the default.
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
source_type
Specifies the geometry type of the network elements that will be processed.
JUNCTIONS—Only junction features or junction objects (network polygon source classes, network point source classes, or junction object tables) will be processed.
EDGES—Only edge features or edge objects will be processed
BOTH—Both junction and edge types will be processed. This is the default.
String
inverse_category_selection
Specifies how the network features or network objects that are tagged with the specified network categories will be processed.
EXCLUDE_CATEGORIES—Network features and objects that are tagged with the specified network categories will not be removed, while any other network features and objects will be removed. This is the default.
INCLUDE_CATEGORIES—Network features and objects that are tagged with the specified network categories will be removed.
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 network features and objects that are tagged with the specified categories will be removed from the generated diagrams.
If the inverse_category_selection parameter is set to EXCLUDE_CATEGORIES, the network features and objects that are tagged with the specified categories will not be removed from the generated diagrams, while network features and objects that are not tagged with the specified categories will be removed.
String
unconnected_junctions
Specifies whether diagram junction and diagram container candidates must be unconnected to be removed.
Note:
This parameter is used when the source_type parameter is set to JUNCTIONS, otherwise it is ignored.
MUST_BE_UNCONNECTED—Diagram junction and diagram container candidates must be unconnected to be removed.
NO_CONSTRAINT—Neither diagram junction nor diagram container candidates need to be unconnected to be removed. This is the default.
Boolean
one_connected_junction
Specifies whether diagram junction and diagram container candidates must be connected to a single diagram junction or diagram container to be removed.
Note:
This parameter is used when the source_type parameter is set to JUNCTIONS, otherwise it is ignored.
MUST_BE_CONNECTED_TO_SINGLE_JUNCTION—Diagram junction and diagram container candidates must be connected to a single diagram junction or diagram container to be removed.
NO_CONSTRAINT—Neither diagram junction nor diagram container candidates need to be connected to a single diagram junction or diagram container to be removed. This is the default.
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
AddRemoveFeatureByCategoryRule example (stand-alone script)
Add a Remove Feature rule to the MyTemplate1 template existing for a given network to remove any linear containers that are tagged with the LinearContainer network category.