Export Asset Package

Summary

Exports a utility network, related layers, related tables, and properties of a utility network to an asset package.

Usage

  • If using an enterprise geodatabase the following notes apply:

    • The connected ArcGIS Enterprise portal account must be the utility network owner.
    • The connected enterprise geodatabase user must be the utility network owner.
    • This tool should be executed when connected to the default version.

Syntax

arcpy.NOALIAS.UtilityNetworkToAssetPackage(in_utility_network, domain_networks, {export_options}, {include_data}, output_name, output_folder)
NameExplanationData Type
in_utility_network

The utility network that will be used to create an asset package.

Utility Network
Input Utility Network

The utility network that will be used to create an asset package.

Utility Network
domain_networks
[domain_networks,...]

The domain networks to be exported.

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

Multiple Value
Domain Networks to export

The domain networks to be exported.

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

Multiple Value
export_options
(Optional)

Specify the items to export.

  • UN—Exports the utility network and its tables.
  • UN_RELATED—Exports the utility network and all dependant classes and tables.
  • WORKSPACE—Exports all items in the geodatabase containing the utility network. This is the default.
String
Export Options

Specify the items to export.

  • Utility Network sources—Exports the utility network and its tables.
  • Utility Network sources with related tables—Exports the utility network and all dependant classes and tables.
  • All items in the workspace—Exports all items in the geodatabase containing the utility network. This is the default.
String
include_data
(Optional)

Specifies whether the output asset package will contain all of the data from the input or only the schema. If not defined, no data will be loaded.

  • INCLUDE_DATA—Loads the data from all feature classes and tables, and exports associations and subnetwork controllers.
  • SCHEMA_ONLY—Only the schema of the utility network is exported. This is the default.

Boolean
Include data

Specifies whether the output asset package will contain all of the data from the input or only the schema. If not defined, no data will be loaded.

  • Checked—Loads the data from all feature classes and tables, and exports associations and subnetwork controllers.
  • Unchecked—Only the schema of the utility network is exported. This is the default.

Boolean
output_name

The name of the output asset package.

String
Package Name

The name of the output asset package.

String
output_folder

The folder location where the output asset package will be created.

Workspace
Folder Location

The folder location where the output asset package will be created.

Workspace
UtilityNetworkToAssetPackage example (Python window)

The following Python window script demonstrates how to use the UtilityNetworkToAssetPackage tool in immediate mode:

arcpy.pt.UtilityNetworkToAssetPackage("C:/data/connection.sde/gis.SYSTEM/gis.WaterNetwork", "Water", "C:/data", "Water_export")
UtilityNetworkToAssetPackage example (stand-alone script)

The following stand-alone script demonstrates how to use the UtilityNetworkToAssetPackage tool:

# Name: Export_UtilityNetwork.py
# Description: Exports the utility network to asset package

# Import system modules
import arcpy

# Set local variables
utility_network = "C:/data/connection.sde/gis.SYSTEM/gis.WaterNetwork"
domain_networks = ["Water"]
folder = "C:/data"
package_name = "Water_export"
export_data = False

# When the utility network is in an enterprise geodatabase, you need to sign in to Portal.
arcpy.SignInToPortal(portal_url=arcpy.GetActivePortalURL(), username='my_user', password='my_password')

# Create the new asset package
arcpy.pt.UtilityNetworkToAssetPackage(utility_network, domain_networks, folder, package_name, export_data)

Environments

Licensing information

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