<?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 Create Network Dataset from Arcpy in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/create-network-dataset-from-arcpy/m-p/1595370#M8975</link>
    <description>&lt;LI-CODE lang="c"&gt;import arcpy

arcpy.CheckOutExtension("network")

new_network_location = r"C:\\GIS590\\RawData_Preprocessing_Dev\\Changed_Features.gdb\\Changed_Features_ND"
xml_template = r"C:\\GIS590\\RawData_Preprocessing_Dev\\Roads_Again_Dataset_Template.xml"
arcpy.na.CreateNetworkDatasetFromTemplate(xml_template,new_network_location)&lt;/LI-CODE&gt;&lt;P&gt;Above is the code i am using. This works in the ArcGIS environment but when I run this through Arcpy in VSCode. The ND is built but it doesn't populate the properties that are within the XML instead i get a properties section that looks like this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EmmaButzler_0-1741894921682.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127879i8AE216EF9E67DE84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EmmaButzler_0-1741894921682.png" alt="EmmaButzler_0-1741894921682.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why does this occer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Mar 2025 19:42:20 GMT</pubDate>
    <dc:creator>EmmaButzler</dc:creator>
    <dc:date>2025-03-13T19:42:20Z</dc:date>
    <item>
      <title>Create Network Dataset from Arcpy</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/create-network-dataset-from-arcpy/m-p/1595370#M8975</link>
      <description>&lt;LI-CODE lang="c"&gt;import arcpy

arcpy.CheckOutExtension("network")

new_network_location = r"C:\\GIS590\\RawData_Preprocessing_Dev\\Changed_Features.gdb\\Changed_Features_ND"
xml_template = r"C:\\GIS590\\RawData_Preprocessing_Dev\\Roads_Again_Dataset_Template.xml"
arcpy.na.CreateNetworkDatasetFromTemplate(xml_template,new_network_location)&lt;/LI-CODE&gt;&lt;P&gt;Above is the code i am using. This works in the ArcGIS environment but when I run this through Arcpy in VSCode. The ND is built but it doesn't populate the properties that are within the XML instead i get a properties section that looks like this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EmmaButzler_0-1741894921682.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127879i8AE216EF9E67DE84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EmmaButzler_0-1741894921682.png" alt="EmmaButzler_0-1741894921682.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why does this occer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 19:42:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/create-network-dataset-from-arcpy/m-p/1595370#M8975</guid>
      <dc:creator>EmmaButzler</dc:creator>
      <dc:date>2025-03-13T19:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create Network Dataset from Arcpy</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/create-network-dataset-from-arcpy/m-p/1595382#M8976</link>
      <description>&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/network-analyst/create-network-dataset-from-template.htm" target="_blank"&gt;Create Network Dataset From Template (Network Analyst)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;the second code example seems to specify a original network dataset as one of its setup parameters&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 19:54:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/create-network-dataset-from-arcpy/m-p/1595382#M8976</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2025-03-13T19:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create Network Dataset from Arcpy</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/create-network-dataset-from-arcpy/m-p/1595394#M8977</link>
      <description>&lt;P&gt;Thanks for your response. I tried this and i still got the same "Cannot connect to database"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 20:16:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/create-network-dataset-from-arcpy/m-p/1595394#M8977</guid>
      <dc:creator>EmmaButzler</dc:creator>
      <dc:date>2025-03-13T20:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create Network Dataset from Arcpy</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/create-network-dataset-from-arcpy/m-p/1595404#M8980</link>
      <description>&lt;P&gt;There's not enough information here to diagnose the problem.&amp;nbsp; That "Cannot connect to database" error usually appears when either something is terribly wrong or there's a bug in Pro.&amp;nbsp; Technically users should never see that!&amp;nbsp; Are you able to share your data and template (send me a private message if you wish to share privately)?&amp;nbsp; Also, what version of ArcGIS Pro are you running?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 20:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/create-network-dataset-from-arcpy/m-p/1595404#M8980</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2025-03-13T20:39:27Z</dc:date>
    </item>
  </channel>
</rss>

