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)
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.
Why does this occer?
Create Network Dataset From Template (Network Analyst)—ArcGIS Pro | Documentation
the second code example seems to specify a original network dataset as one of its setup parameters
Thanks for your response. I tried this and i still got the same "Cannot connect to database"
There's not enough information here to diagnose the problem. That "Cannot connect to database" error usually appears when either something is terribly wrong or there's a bug in Pro. Technically users should never see that! Are you able to share your data and template (send me a private message if you wish to share privately)? Also, what version of ArcGIS Pro are you running?