Add Structural Attachments Rule (Network Diagram)

Summary

Adds a diagram rule to automatically represent structural attachments during diagram building based on an existing template. This rule applies to structural attachment associations in which both the attached network element and the structure element are currently represented in the diagrams.

Learn more about adding structural attachments to diagrams

Caution:

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 Diagram to update 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:

    • The Input Network parameter value must be from a database connection established as the database utility network owner.
    • The connected ArcGIS Enterprise portal account must be the portal utility network owner.
    • This tool must be connected to the default version, which is public and not protected.

  • Structural attachment associations are not drawn by default in a network map. The Add Structural Attachments rule allows you to generate diagrams in which structural attachment associations are systematically drawn each time the attached network element and structure element are present in the diagram at the time the rule runs. They appear as straight diagram edges between the related attached and structure diagram features.

  • This rule is time consuming. Consider your existing template rule sequence before configuring it on diagram templates. Only use an Add Structural Attachment rule if it will impact the resulting diagrams. For example, if there are Remove Feature rules configured to remove all structures in the generated diagrams, there is no reason to add a Structural Attachments rule to the template.

Parameters

LabelExplanationData Type
Input Network

The utility network containing the diagram template to modify.

Utility Network
Input Diagram Template

The name of the diagram template that will be modified.

String
Active

Specifies whether the rule will be active when generating and updating diagrams based on the specified template.

  • Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.
  • Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.

Boolean
Description
(Optional)

The description of the rule.

String

Derived Output

LabelExplanationData Type
Output Network

The updated utility network.

Utility Network
Output Diagram Template

The name of the diagram template.

String

arcpy.nd.AddStructuralAttachmentsRule(in_utility_network, template_name, is_active, {description})
NameExplanationData Type
in_utility_network

The utility network containing the diagram template to modify.

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.

  • ACTIVEThe added rule will become enabled during the generation and update of any diagrams based on the input template. This is the default.
  • INACTIVEThe added rule will not become enabled during the generation or update of any diagrams based on the input template.
Boolean
description
(Optional)

The description of the rule.

String

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network.

Utility Network
out_template_name

The name of the diagram template.

String

Code sample

AddStructuralAttachmentsRule example (Python window)

The following script creates a template similar to the Basic template in a given network.

import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "SameAsBasicTemplate"
arcpy.AddDiagramTemplate_nd(input_Network, input_DiagramTemplate)
arcpy.AlterDiagramTemplate_nd(input_Network, input_DiagramTemplate, 
                              input_DiagramTemplate, "NOT_DEFAULT_TEMPLATE", 
                              "DO_NOT_REMOVE_RULES_AND_LAYOUTS",
                              "KEEP_VERTICES", "0.3 Meters")
arcpy.nd.AddConnectivityAssociationsRule(input_Network, 
                                         input_DiagramTemplate, "ACTIVE")
arcpy.nd.AddStructuralAttachmentsRule(input_Network, 
                                      input_DiagramTemplate, "ACTIVE")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics