ImportUtilityNetworkMatrix

Title  Import Matrix

Description

Loads the values from the rule, network category, and terminal assignment workbooks.

Usage

          
Use this tool along with ExportUtilityNetworkMatrix to modify properties in bulk.
Rules removed from the worksheet are not removed from the utility network.
New network categories can be added by adding a new column. Assignments can be removed by deleting 1 from the cell.
Changing existing terminal assignments are not supported, only setting a terminal configuration from the default of single terminal.
For additional information, see the help page on GitHub.

License

Standard

Syntax

ImportUtilityNetworkMatrix (network, workbook, matrix_options)

Parameter Explanation Data Type
network Dialog Reference

The utility network or asset package to modify.

GPComposite
workbook Dialog Reference

The workbook to import.

DEFile
matrix_options Dialog Reference

The properties to modify.

GPString

Code Samples

ImportUtilityNetworkMatrix example 1 (Python window)

Imports a rule matrix into an asset package.

import arcpy

arcpy.udms.ImportUtilityNetworkMatrix("D:/data/asset_package.gdb", "D:/data/rule.xlsx", "RULES")

ImportUtilityNetworkMatrix example 2 (stand-alone script)

Imports rules, categories, roles, and terminals from an Excel workbook to the utility network.

import arcpy

un = "D:/data/network.gdb/UtilityNetwork/Network"
output = "D:/data/matrix.xlsx"
choices = [
    "ASSOCIATION_ROLES",
    "CATEGORIES",
    "TERMINALS",
    "RULES",
]

arcpy.udms.ImportUtilityNetworkMatrix(
    network=un,
    workbook=output,
    matrix_options=choices,
)