How to make a template (.xml) from Network Dataset

1698
2
10-10-2016 08:10 AM
MohsenZare1
New Contributor

I'm trying to create a template (.xml) from a network dataset. However apparently the tool is not available but the online ESRI help has code samples. I was wondering if anyone has had the same issue. On a side note all the ArcGIS help is on GIS Pro. Does this mean the tool is only available to GIS pro users? I'm using Arcmap 10.2.

THe code is as below:

import arcpy
from arcpy import env 
arcpy.CheckOutExtension("Network")
myPath = r"C:\Users\za\Desktop\TT"
env.workspace = myPath + r"\Tt_Home.gdb" 
inNetwork = r"\NetworkDataset\NetworkDataset_New" 
output_xml = myPath + "/myTemplate.xml"
inNetwork arcpy.na.CreateTemplateFromNetworkDataset(inNetwork, output_xml)

The error I get is as below:

AttributeError: 'module' object has no attribute 'CreateTemplateFromNetworkDataset'

0 Kudos
2 Replies
MelindaMorang
Esri Regular Contributor

Yes, this tool is only available in ArcGIS Pro.  It is not available in ArcMap.

Documentation/help for the latest version of ArcMap is available here: ArcMap | ArcGIS for Desktop 

Documentation for ArcMap 10.2 is here: ArcGIS Help (10.2, 10.2.1, and 10.2.2) 

MelindaMorang
Esri Regular Contributor

Update: This tool is available in ArcMap as of the 10.6 release.

0 Kudos