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)
Name | Explanation | Data 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.
| String |
Export Options
| Specify the items to export.
| 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.
| 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.
| 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