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, output_folder, output_name, {include_data})
ParameterExplanationData Type
in_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
output_folder

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

Workspace
output_name

The name of the output asset package.

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

Code sample

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