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 May be inconsistent until they are updated.

Usage

  • This tool is not supported when working with a utility network service. You must work with either a utility network in a file geodatabase or a database connection to a utility network in an enterprise geodatabase. When working with an enterprise geodatabase, the connection must be established as the database utility network owner.

  • When performing this operation on a utility network in an enterprise geodatabase, the connected ArcGIS Enterprise portal account must be the portal utility network owner.

  • The network data element specified for the input network parameter must be from either a utility network in a file geodatabase or a database connection to a utility network in an enterprise geodatabase.

  • 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 executes. 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 truly impact the resulting diagrams the structures in the diagrams. If the template is configured to run a Trace rule without including structures or 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.

Syntax

AddStructuralAttachmentsRule(in_utility_network, template_name, is_active, {description})
ParameterExplanationData Type
in_utility_network

The utility network containing the diagram template to modify.

Utility Network
template_name

The name of the diagram template to modify.

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.AddConnectivityAssociationsRule_nd(input_Network, 
                                         input_DiagramTemplate, "ACTIVE")
arcpy.AddStructuralAttachmentsRule_nd(input_Network, 
                                      input_DiagramTemplate, "ACTIVE")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics