<?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: Python - Saving Results from Network Analyst Processes  in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306867#M23863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that Copy Features doesn't work for you?&lt;/P&gt;&lt;P&gt;As far as I am concerned a feature class in the "in_memory" workspace is still a feature class. Should copy out the disk easily.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jan 2016 09:45:22 GMT</pubDate>
    <dc:creator>NeilAyres</dc:creator>
    <dc:date>2016-01-06T09:45:22Z</dc:date>
    <item>
      <title>Python - Saving Results from Network Analyst Processes</title>
      <link>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306866#M23862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m writing a python script to run some network analyst processes.&amp;nbsp; The analysis process runs fine in terms of creating a route layer, adding all the relevant points and restrictions and solving the NA scenario.&amp;nbsp; I have inspected the results by saving out a layer file of the results (using the Save to Layer File tool) and its all in order.&amp;nbsp; This layer file links back to the ‘Memory Feature Class’.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The one issue I’m trying to overcome is how I then save the results as a standard feature class in a geodatabase.&amp;nbsp; I’ve tried several different tools (copy features, features to line etc.), but they are all looking for a feature layer or feature class as the input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone tell me how I can save from a memory feature class to a standard feature class in python?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2016 07:53:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306866#M23862</guid>
      <dc:creator>GregKing</dc:creator>
      <dc:date>2016-01-06T07:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python - Saving Results from Network Analyst Processes</title>
      <link>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306867#M23863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that Copy Features doesn't work for you?&lt;/P&gt;&lt;P&gt;As far as I am concerned a feature class in the "in_memory" workspace is still a feature class. Should copy out the disk easily.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2016 09:45:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306867#M23863</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2016-01-06T09:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Python - Saving Results from Network Analyst Processes</title>
      <link>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306868#M23864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out Code Sample #4 in the Make Route Layer tool reference in the doc.&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/network-analyst-toolbox/make-route-layer.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/network-analyst-toolbox/make-route-layer.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Make Route Layer—ArcGIS Pro | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="c" style="color: green; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;# Get the output Routes sublayer and save it to a feature class&lt;/SPAN&gt;
&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;RoutesSubLayer&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;ListLayers&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;outNALayer&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;routesLayerName&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;)[&lt;/SPAN&gt;&lt;SPAN class="mi" style="color: #666666; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;management&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;CopyFeatures&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;RoutesSubLayer&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="n" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;outRoutesFC&lt;/SPAN&gt;&lt;SPAN class="p" style="color: #4d4d4d; font-family: Consolas, 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-size: 12px;"&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:41:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306868#M23864</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2021-12-11T14:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python - Saving Results from Network Analyst Processes</title>
      <link>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306869#M23865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's been a while since I actually ran this, but should work just fine: (updated with corrections)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;wsIN = "in_memory"
wsOUT = r"H:\Documents\ArcGIS\MyFileGDB.gdb"
arcpy.env.workspace = wsIN


&lt;SPAN style="font-family: Consolas;"&gt;inFCS = arcpy.ListFeatureClasses()&lt;/SPAN&gt;
for inFC in inFCS:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Consolas;"&gt;desc = arcpy.Describe(inFC)&lt;/SPAN&gt;
&lt;SPAN style="font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;arcpy.Copy&lt;SPAN style="font-family: Consolas;"&gt;Features&lt;/SPAN&gt;_management(inFC, wsOUT + "\\" + &lt;SPAN style="font-family: Consolas;"&gt;desc.name&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:41:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306869#M23865</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T14:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Python - Saving Results from Network Analyst Processes</title>
      <link>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306870#M23866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Melinda, Neil and James for your reply's.&lt;/P&gt;&lt;P&gt;From the sample code for the 'MakeRouteLayer' tool I managed to get it working.&amp;nbsp; This code sample also has the details of how to setup the object that references the 'Routes' in the NA Route Layer.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 02:00:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-saving-results-from-network-analyst/m-p/306870#M23866</guid>
      <dc:creator>GregKing</dc:creator>
      <dc:date>2016-01-07T02:00:38Z</dc:date>
    </item>
  </channel>
</rss>

