Asset Package to Geodatabase (Utility Network Package)

Summary

Uses an asset package to apply domain networks, related tables, and properties of a utility network to a file geodatabase.

Note:

This tool generates the same output as running Create File Geodatabase, Stage Utility Network, and Apply Asset Package in sequence.

Usage

  • This tool allows you to copy the data and schema of an asset package to a file geodatabase so that I can be used in any client that supports file geodatabases.

Parameters

LabelExplanationData Type
Asset Package

The asset package that will be used to configure the schema and properties of a utility network.

Workspace
Service Territory Feature Class

The feature layer that will be used to create the utility network's geographical extent. The service territory feature class must have at least one feature. Utility network features cannot be created outside of this extent.

The feature class will have the following characteristics:

  • It will be copied into the new feature dataset as m- and z-enabled.
  • Editor tracking will be enabled.
  • GlobalIDs will be added if they are not already present.

Feature Layer
Folder Location
(Optional)

The folder location where the file geodatabase will be created.

Workspace
Geodatabase Name
(Optional)

The name of the output file geodatabase.

String
Feature Dataset Name
(Optional)

The name for the feature dataset that will be created in which the utility network and schema will be created.

String
Utility Network Name
(Optional)

The name of the utility network that will be created.

String
Domain Networks to apply
(Optional)

The domain networks in the asset package that will be applied to the utility network.

Multiple Value
Load data
(Optional)

Defines whether data in the asset package is loaded into the utility network.

  • Checked—Appends the data from all feature classes and tables, and imports associations and subnetwork controllers.
  • Unchecked—Only the schema of the utility network is applied. This is the default.
Boolean
Post Process
(Optional)

Post process runs three processes to enable topology, update subnetworks, and update Is Connected.

  • Checked—Enable network topology, update all subnetworks, and update Is Connected will be performed.
  • Unchecked—No network updates will be made. This is the default.
Boolean
Configurations to apply
(Optional)

Select the configuration options you want to apply to your utility network. This parameter is applicable when a D_Configurations table is present in your asset package.

Multiple Value
Rename options
(Optional)

Select the rename option you want to apply to your utility network. This parameter is applicable when the D_Rename table is present in your asset package.

String
Workspace Type
(Optional)

The type of geodatabase to create.

  • File Geodatabase—Creates a file geodatabase. This is the default.
  • Mobile Geodatabase—Creates a mobile geodatabase.
Workspace

arcpy.pt.AssetPackageToFileGeodatabase(asset_package, service_territory_feature_class, {output_folder}, {output_name}, {dataset_name}, {in_utility_network_name}, {domain_networks}, {load_data}, {post_process}, {configurations}, {rename_field}, {workspace_type})
NameExplanationData Type
asset_package

The asset package that will be used to configure the schema and properties of a utility network.

Workspace
service_territory_feature_class

The feature layer that will be used to create the utility network's geographical extent.

Feature Layer
output_folder
(Optional)

The folder location where the file geodatabase will be created.

Workspace
output_name
(Optional)

The name of the output file geodatabase.

String
dataset_name
(Optional)

The name for the feature dataset that will be created in which the utility network and schema will be created.

String
in_utility_network_name
(Optional)

The name of the utility network that will be created.

String
domain_networks
[domain_networks,...]
(Optional)

The domain networks in the asset package that will be applied to the utility network.

In python, * can be passed in to select all domain networks.

Multiple Value
load_data
(Optional)

Defines whether data in the asset package is loaded into the utility network.

  • INCLUDE_DATA—Appends the data from all feature classes and tables, and imports associations and subnetwork controllers.
  • SCHEMA_ONLY—Only the schema of the utility network is applied. This is the default.
Boolean
post_process
(Optional)

Post process runs three processes to enable topology, update subnetworks, and update Is Connected.

  • POST_PROCESS—Enable network topology, update all subnetworks, and update Is Connected will be performed.
  • NO_POST_PROCESS—No network updates will be made. This is the default.
Boolean
configurations
(Optional)

Select the configuration options you want to apply to your utility network. This parameter is applicable when a D_Configurations table is present in your asset package.

In python, * can be passed in to select all configurations.

Multiple Value
rename_field
[rename_field,...]
(Optional)

Select the rename option you want to apply to your utility network. This parameter is applicable when the D_Rename table is present in your asset package.

String
workspace_type
(Optional)

The type of geodatabase to create.

  • FGDB—Creates a file geodatabase. This is the default.
  • MGDB—Creates a mobile geodatabase.
Workspace

Code sample

AssetPackageToFileGeodatabase example (Python window)

Applies an asset package to a file geodatabase.

arcpy.pt.AssetPackageToFileGeodatabase("D:/data/ElectricNetwork.gdb")
AssetPackageToFileGeodatabase (stand-alone script)

Applies an asset package to a file geodatabase.

Name: AP_to_FGDB.py
# Description: Creates a new utility network in file geodatabase based on an asset package.

# Import system modules
import arcpy
import os

# Set local variables
asset_package = "C:/data/Water_AssetPackage.gdb"
service_territory = os.path.join(asset_package, 'UtilityNetwork', 'ServiceTerritory')
domain_networks = '*'
load = True
post_process = True
configurations = None
rename = None

folder = 'C:/data'
geodatabase_name = 'Water_UN'
feature_dataset = 'UN'
network = 'Network'

# Create the utility network
arcpy.pt.AssetPackageToUtilityNetwork(asset_package, service_territory,
                                      folder, geodatabase_name, feature_dataset, network,
                                      domain_networks, load, post_process, configurations, rename)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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