-1

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
import os
import inspect
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"
print output_xml
print inNetwork
arcpy.na.CreateTemplateFromNetworkDataset(inNetwork, output_xml)

The error I get is as below:

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

  • 1
    "All the ArcGIS help is on GIS Pro" - Where did you look? Esri has all the documentation going back as far as version 9.1. Documentation Archive for 9.1 - 10.2, and ArcGIS Help for 10.3 - 10.4 (currently) – Midavalo Oct 10 '16 at 18:25
  • Sometimes the message "module object has no attribute..." for extension modules are because arcpy hasn't been able to get a license for the extension. Even though you have a Check out Extension line, if one wasn't available it won't tell you, but will fail when you try to use the module. – Midavalo Oct 10 '16 at 18:27
1

I contacted Esri regarding this issue and they advised me that the Create Network Dataset From Template tool only exists in ArcGIS Pro.

For reference it:

Creates a new network dataset with the schema contained in the input template file (.xml). All the feature classes and input tables required for creating the network dataset must already exist before this tool is executed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.