CreateAssociationLines

Title  Create Association Lines

Description

Creates lines representing utility network associations.

Usage

          
For polylines and polygons, the centroid will be used.

License

Basic

Syntax

CreateAssociationLines (network, association_types, output_lines, {extent}, {completely_within})

Parameter Explanation Data Type
network Dialog Reference

The utility network or asset package to process.

GPComposite
association_types Dialog Reference

The association types to generate

  • Junction Junction Connectivity
  • Containment
  • Structural Attachment

GPString
output_lines Dialog Reference

The output line feature class.

DEFeatureClass
extent (Optional) Dialog Reference

If specified, only generate lines for features intersecting this extent. By default, the entire network is processed.

GPExtent
completely_within (Optional) Dialog Reference

If specified, both sides of the association must be present in the extent. This option is only valid when specifying an extent.

GPBoolean

Code Samples

CreateAssociationLines example 1 (Python window)

Synthesize all Junction-Junction associations.

import arcpy

arcpy.udms.CreateAssociationLines("Naperville Network", "JUNCTION_JUNCTION", "memory/AssociationLines")

CreateAssociationLines example 2 (stand-alone script)

Synthesize Junction-Junction and attachment associations in the current map extent.

import os

import arcpy

network = "Naperville Network"

# Get extent from the active view.
aprx = arcpy.mp.ArcGISProject("CURRENT")
extent = aprx.activeView.camera.getExtent()

arcpy.udms.CreateAssociationLines(
    network=network,
    association_types=["JUNCTION_JUNCTION", "STRUCTURAL_ATTACHMENT"],
    output_lines=os.path.join(aprx.defaultGeodatabase, "AssociationLines"),
    extent=extent,
    completely_within=False,
)