<?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: How to add the selected features into the trace locations using python script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1297015#M67852</link>
    <description>&lt;P&gt;Does nothing happen or did you get an error? Did your selection work? (try it manually and copy the code snippet)&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/select-layer-by-attribute.htm" target="_blank"&gt;Select Layer By Attribute (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or did it fail at this stage?&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/utility-networks/add-trace-locations.htm" target="_blank"&gt;Add Trace Locations (Utility Network)—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(eg feature_class_path)&lt;/P&gt;&lt;P&gt;And finally, why use a cursor when you can make the selection and just add the paths from its result?&lt;/P&gt;&lt;P&gt;what is the destination of the result?&amp;nbsp; gdb? or enterprise?&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 07:46:26 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2023-06-08T07:46:26Z</dc:date>
    <item>
      <title>How to add the selected features into the trace locations using python script</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1297007#M67851</link>
      <description>&lt;P&gt;I want to add multiple selected features into the trace locations using the arcpy.un.AddTraceLocations() method but i am not able to do that I am using this set of code&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;result = arcpy.management.SelectLayerByAttribute(&lt;BR /&gt;    &lt;SPAN&gt;in_layer_or_view&lt;/SPAN&gt;=&lt;SPAN&gt;"ElectricDevice"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;selection_type&lt;/SPAN&gt;=&lt;SPAN&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;where_clause&lt;/SPAN&gt;=&lt;SPAN&gt;"ASSETGROUP = 38"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;invert_where_clause&lt;/SPAN&gt;=&lt;SPAN&gt;None&lt;BR /&gt;&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;with &lt;/SPAN&gt;arcpy.da.SearchCursor(result&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"*"&lt;/SPAN&gt;) &lt;SPAN&gt;as &lt;/SPAN&gt;cursor:&lt;BR /&gt;&lt;SPAN&gt;for &lt;/SPAN&gt;row &lt;SPAN&gt;in &lt;/SPAN&gt;cursor:&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt; arcpy.un.AddTraceLocations(&lt;BR /&gt;&lt;SPAN&gt;in_utility_network&lt;/SPAN&gt;=&lt;SPAN&gt;r"D:\UNM\GDB\Naperville_Electric_2213.gdb\UtilityNetwork\Network"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;out_feature_class&lt;/SPAN&gt;=feature_class_path&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;load_selected_features&lt;/SPAN&gt;=&lt;SPAN&gt;"LOAD_SELECTED_FEATURES"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;clear_trace_locations&lt;/SPAN&gt;=&lt;SPAN&gt;"KEEP_LOCATIONS"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;trace_locations&lt;/SPAN&gt;=row&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;filter_barrier&lt;/SPAN&gt;=&lt;SPAN&gt;"TRAVERSABILITY_BARRIER"&lt;BR /&gt;&lt;/SPAN&gt; )&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Jun 2023 06:19:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1297007#M67851</guid>
      <dc:creator>kumarprince8071</dc:creator>
      <dc:date>2023-06-08T06:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the selected features into the trace locations using python script</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1297015#M67852</link>
      <description>&lt;P&gt;Does nothing happen or did you get an error? Did your selection work? (try it manually and copy the code snippet)&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/select-layer-by-attribute.htm" target="_blank"&gt;Select Layer By Attribute (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or did it fail at this stage?&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/utility-networks/add-trace-locations.htm" target="_blank"&gt;Add Trace Locations (Utility Network)—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(eg feature_class_path)&lt;/P&gt;&lt;P&gt;And finally, why use a cursor when you can make the selection and just add the paths from its result?&lt;/P&gt;&lt;P&gt;what is the destination of the result?&amp;nbsp; gdb? or enterprise?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 07:46:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1297015#M67852</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-06-08T07:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the selected features into the trace locations using python script</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1297100#M67876</link>
      <description>&lt;P&gt;Yes the Select layer By Attribute is working and also i am getting the selected features .&lt;/P&gt;&lt;P&gt;But after that the Add Trace Locations tool is not adding the features into the feature_class_path.&lt;/P&gt;&lt;P&gt;the destination is gdb.&lt;/P&gt;&lt;P&gt;Not getting any error but the Add Trace Location is not adding the features.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 13:50:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1297100#M67876</guid>
      <dc:creator>kumarprince8071</dc:creator>
      <dc:date>2023-06-08T13:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the selected features into the trace locations using python script</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1328089#M68620</link>
      <description>&lt;P&gt;did you ever resolve this?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 02:49:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1328089#M68620</guid>
      <dc:creator>EddX</dc:creator>
      <dc:date>2023-09-13T02:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the selected features into the trace locations using python script</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1348119#M69212</link>
      <description>&lt;P&gt;Hi, I don't think you can add the row from a cursor directly into the trace_location parameter.&lt;/P&gt;&lt;P&gt;It should be formatted as follows :&lt;/P&gt;&lt;P&gt;"'FC name' {featureGlobalID} 'terminal' percentageAlong"&lt;/P&gt;&lt;P&gt;Did you finally succeed ?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 03:11:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1348119#M69212</guid>
      <dc:creator>PierreloupDucroix</dc:creator>
      <dc:date>2023-11-10T03:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the selected features into the trace locations using python script</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1494960#M70857</link>
      <description>&lt;P&gt;Hey man having the same problem here, Have you solved this?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 15:04:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-the-selected-features-into-the-trace/m-p/1494960#M70857</guid>
      <dc:creator>WonjeaLee</dc:creator>
      <dc:date>2024-06-19T15:04:25Z</dc:date>
    </item>
  </channel>
</rss>

