Modify Terminal Connection (Utility Network Package)

Summary

This tool can be used to automatically assign values to the FromDeviceTerminal and ToDeviceTerminal fields on the line class. Coincident devices that have terminal configurations will be assigned based on digitized direction.

Usage

  • Not Applicable

Parameters

LabelExplanationData Type
Input Network

The asset package or utility network with terminal configurations where the values will be assigned.

Workspace
Domain Network

The domain network with devices and lines to analyze.

String
Honor digitized direction

Use the line's digitized direction when assigning direction.

  • Checked—Only assign terminals that match digitized direction. This is the default.
  • Unchecked—Assign terminals opposite digitized direction if there are no rules that match the direction.
Boolean
Dialog Reference
(Optional)

Use the line's digitized direction when assigning direction.

  • Checked—Keep existing values. This is the default.
  • Unchecked—Treat all existing values as missing and overwrite when they are different.
Boolean
Log file
(Optional)

The optional CSV file that will store the before and after field values.

File

arcpy.pt.AssignTerminalConnections_(input_dataset, domain_network, honor_direction, {keep_existing}, {log_file})
NameExplanationData Type
input_dataset

The asset package or utility network with terminal configurations where the values will be assigned.

Workspace
domain_network

The domain network with devices and lines to analyze.

String
honor_direction

Use the line's digitized direction when assigning direction.

  • USE_DIGITIZED—Only assign terminals that match digitized direction. This is the default.
  • PREFER_DIGITIZED—Assign terminals opposite digitized direction if there are no rules that match the direction.
Boolean
keep_existing
(Optional)

Use the line's digitized direction when assigning direction.

  • KEEP_VALUES—Keep existing values. This is the default.
  • OVERWRITE_VALUES—Treat all existing values as missing and overwrite when they are different.
Boolean
log_file
(Optional)

The optional CSV file that will store the before and after field values.

File

Code sample

AssignTerminalConnections example (Python window)

The following Python window script demonstrates how to use the AssignTerminalConnections tool in immediate mode.

arcpy.pt.AssignTerminalConnections("D:/data/Water_AssetPackage.gdb", "Water")
AssignTerminalConnections example (stand-alone script)

Applies an asset package to a file geodatabase.

# Name: AssignTerminalConnections.py
# Description: Bulk assigns terminals to coincident lines

# Import required modules
import arcpy
import os

# Local Variables
asset_package = "D:/data/Water_AssetPackage.gdb"
network = "Water"
use_digitized = True
use_existing = True
log = os.path.join(os.path.dirname(asset_package), "water_log.csv")

arcpy.pt.AssignTerminalConnections(
    input_dataset=asset_package,
    domain_network=network,
    honor_direction=use_digitized,
    keep_existing=use_existing,
    log_file=log,
)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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