<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>idea Utility Network Automation in ArcGIS API for Python Ideas</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-ideas/utility-network-automation/idi-p/1555768</link>
    <description>&lt;P&gt;In the past, I was creating an automated workflow to set up a utility network and then publish it to an enterprise portal. While coding, I discovered that it’s not possible to add a utility network to a map in ArcGIS Pro via the Python API—it always results in a runtime error.&lt;/P&gt;&lt;P&gt;Additionally, the same issue occurs in the portal web environment: It’s not possible to add a utility network feature layer from the portal into a web map using the ArcGIS Python API. The issue seems to lie with the layer of type "Utility Network Layer"; the error message indicates that it doesn’t have a renderer attached yet.&lt;/P&gt;&lt;P&gt;After contacting support, I was informed that this functionality hasn’t been developed yet. Since this feature would be quite important for working with utility networks in an enterprise environment, it would be very helpful if this functionality could be introduced in the future.&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2024 11:57:36 GMT</pubDate>
    <dc:creator>nidia99</dc:creator>
    <dc:date>2024-11-06T11:57:36Z</dc:date>
    <item>
      <title>Utility Network Automation</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-ideas/utility-network-automation/idi-p/1555768</link>
      <description>&lt;P&gt;In the past, I was creating an automated workflow to set up a utility network and then publish it to an enterprise portal. While coding, I discovered that it’s not possible to add a utility network to a map in ArcGIS Pro via the Python API—it always results in a runtime error.&lt;/P&gt;&lt;P&gt;Additionally, the same issue occurs in the portal web environment: It’s not possible to add a utility network feature layer from the portal into a web map using the ArcGIS Python API. The issue seems to lie with the layer of type "Utility Network Layer"; the error message indicates that it doesn’t have a renderer attached yet.&lt;/P&gt;&lt;P&gt;After contacting support, I was informed that this functionality hasn’t been developed yet. Since this feature would be quite important for working with utility networks in an enterprise environment, it would be very helpful if this functionality could be introduced in the future.&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 11:57:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-ideas/utility-network-automation/idi-p/1555768</guid>
      <dc:creator>nidia99</dc:creator>
      <dc:date>2024-11-06T11:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Utility Network Automation</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-ideas/utility-network-automation/idc-p/1613857#M154</link>
      <description>&lt;P&gt;We are implementing a similar workflow where we make a full copy of our Water Utility Network in a different Postgres database and schema to publish a service specifically for running trace functionality.&amp;nbsp; Each time we drop and recreate the replica of the Utility Network, we must republish the service manually (due to the internal naming of a number of UN objects - UN_1234_DirtyAreas for example).&lt;/P&gt;&lt;P&gt;We are able to add the Network layer to an APRX using arcpy (code included below), but the issue we are hitting is at the publishing stage when calling&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;arcpy.UploadServiceDefinition_server&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;Have you (or anyone reading this) been able to automate the publishing of a Utility Network service?&lt;/P&gt;&lt;P&gt;In case it helps, here is the basic code we are using to add the Network object to an APRX.&amp;nbsp; And for reference, we are running ArcGIS Pro 3.3.1 and Python 3.9.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy
mapname = "TraceReplica"
map_document_fullpath = rf"D:\repos\UtilityNetworkTrace\{mapname}.aprx"
aprx = arcpy.mp.ArcGISProject(map_document_fullpath)
m = aprx.listMaps(mapname)[0]
d = r"***path_to_sde_connection_file***\untrace.tracereplica.UtilityNetwork\untrace.tracereplica.Network"
m.addDataFromPath(d)
aprx.save()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 00:39:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-ideas/utility-network-automation/idc-p/1613857#M154</guid>
      <dc:creator>RussCoffey</dc:creator>
      <dc:date>2025-05-13T00:39:46Z</dc:date>
    </item>
  </channel>
</rss>

