<?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>topic Re: Add Trace Locations - Error in Portal with custom GP in ArcGIS Utility Network Questions</title>
    <link>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1664841#M5962</link>
    <description>&lt;P&gt;You would need to write python to turn the features into trace locations for that tool. You'll need to know the network source id, global id, terminal id (points), and percent along (lines) of the starting location(s).&lt;/P&gt;</description>
    <pubDate>Tue, 11 Nov 2025 05:24:07 GMT</pubDate>
    <dc:creator>RobertKrisher</dc:creator>
    <dc:date>2025-11-11T05:24:07Z</dc:date>
    <item>
      <title>Add Trace Locations - Error in Portal with custom GP</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1662363#M5916</link>
      <description>&lt;P&gt;I’m running an isolation trace on a Utility Network through a geoprocessing tool.&lt;BR /&gt;In one of the steps, I’m using &lt;STRONG&gt;Add Trace Locations&lt;/STRONG&gt; with the &lt;STRONG&gt;Load Selected Features&lt;/STRONG&gt; option.&lt;/P&gt;&lt;P&gt;I can successfully run the geoprocessing tool in ArcGIS Pro, but when I publish it and run it through the Portal, I get the following error:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;ERROR 000228: Cannot open the dataset.&lt;BR /&gt;Failed to execute (AddTraceLocations).&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here’s the relevant part of my code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.un.AddTraceLocations(
    in_utility_network="https://myportal/server/rest/services/Agua/Agua/FeatureServer/8",
    out_feature_class=temp_starting,
    load_selected_features="LOAD_SELECTED_FEATURES",
    clear_trace_locations="CLEAR_LOCATIONS",
    trace_locations=None,
    filter_barrier="TRAVERSABILITY_BARRIER"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My &lt;STRONG&gt;temp_starting&lt;/STRONG&gt; variable is a feature class created before in the &lt;STRONG&gt;scratch_gdb&lt;/STRONG&gt;, using the same schema as &lt;STRONG&gt;UN_Temp_Starting_Points&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Does anyone know if there are any behavioral differences for this tool when running in ArcGIS Pro versus in a Portal environment?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2025 21:49:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1662363#M5916</guid>
      <dc:creator>CeciliaAtos</dc:creator>
      <dc:date>2025-10-30T21:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Add Trace Locations - Error in Portal with custom GP</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1662413#M5918</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/923003"&gt;@CeciliaAtos&lt;/a&gt;&amp;nbsp; - I think the issue here is the "load_selected" parameter. my understanding is that this will not work in the geoprocessing tool like it does on ArcGIS pro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could use the&amp;nbsp;arcpy.management.CopyFeature to create a feature class in the scratch gdb and then format it in the schema of the&amp;nbsp;&lt;STRONG&gt;UN_Temp_Starting_Points.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Then load the starting points using the "&lt;SPAN&gt;trace_locations&lt;/SPAN&gt;" parameter in&amp;nbsp;&lt;STRONG&gt;Add Trace Locations &lt;/STRONG&gt;or you can directly supply these to the &lt;STRONG&gt;Trace&lt;/STRONG&gt; function.&lt;/P&gt;&lt;P&gt;This article has some more info -&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/3.3/tool-reference/utility-networks/add-trace-locations.htm#:~:text=AddTraceLocations%20example%202,no%20active%20map" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/3.3/tool-reference/utility-networks/add-trace-locations.htm#:~:text=AddTraceLocations%20example%202,no%20active%20map&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy

# Set the outputZFlag environment to Enabled
arcpy.env.outputZFlag = "Enabled"

# AddTraceLocations
arcpy.un.AddTraceLocations(r"http://landbase.mydomain.com/server/rest/services/NapervilleElectric/FeatureServer/9", 
                           r"C:\Project\MyUNProject.gdb\TraceLocations",
                           "DO_NOT_LOAD_SELECTED_FEATURES",
                           "KEEP_LOCATIONS",
                           "'Circuit Breaker' {DDB0765D-860A-4054-908D-9360E1A32F74} '(3/Load)' #";"'ElecDist Line' {67C0534B-A80D-4E5F-8926-5FB5F887A5F2} # 0.25","TRAVERSABILITY_BARRIER")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 01:35:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1662413#M5918</guid>
      <dc:creator>gis_KIWI4</dc:creator>
      <dc:date>2025-10-31T01:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Add Trace Locations - Error in Portal with custom GP</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1662475#M5920</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/595273"&gt;@gis_KIWI4&lt;/a&gt;&amp;nbsp;is correct, when running that GP tool in a server context, it doesn't have access to the map that the user has open, so it has no way of knowing what is selected. The solution to the problem is to populate the trace_location parameter with the information for the locations/features you want to use as barriers.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 13:11:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1662475#M5920</guid>
      <dc:creator>RobertKrisher</dc:creator>
      <dc:date>2025-10-31T13:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Add Trace Locations - Error in Portal with custom GP</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1664714#M5959</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/595273"&gt;@gis_KIWI4&lt;/a&gt;&amp;nbsp;! Thanks for showing where the script is decoding error.&lt;/P&gt;&lt;P&gt;I understand that ArcGIS Server doesn’t recognize selected features. So, how would the &lt;EM&gt;Copy Features&lt;/EM&gt; tool help in this case? I need the user to select a pipe and use that pipe as the starting point for my isolation trace.&lt;/P&gt;&lt;P&gt;Would you, or&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/138089"&gt;@RobertKrisher&lt;/a&gt;&amp;nbsp;, help me with some ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2025 19:34:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1664714#M5959</guid>
      <dc:creator>CeciliaAtos</dc:creator>
      <dc:date>2025-11-10T19:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Add Trace Locations - Error in Portal with custom GP</title>
      <link>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1664841#M5962</link>
      <description>&lt;P&gt;You would need to write python to turn the features into trace locations for that tool. You'll need to know the network source id, global id, terminal id (points), and percent along (lines) of the starting location(s).&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 05:24:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-utility-network-questions/add-trace-locations-error-in-portal-with-custom-gp/m-p/1664841#M5962</guid>
      <dc:creator>RobertKrisher</dc:creator>
      <dc:date>2025-11-11T05:24:07Z</dc:date>
    </item>
  </channel>
</rss>

