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:
<SPAN class="" style="color: #101094; border: 0px; font-size: 13px;">import</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> arcpy
</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"></SPAN><SPAN class="" style="color: #101094; border: 0px; font-size: 13px;">from</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> arcpy </SPAN><SPAN class="" style="color: #101094; border: 0px; font-size: 13px;">import</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> env
arcpy</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">.</SPAN><SPAN class="" style="color: #2b91af; border: 0px; font-size: 13px;">CheckOutExtension</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">(</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;">"Network"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">)
</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">myPath </SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> r</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;">"C:\Users\za\Desktop\TT"
</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">env</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">workspace </SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> myPath </SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">+</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> r</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;">"\Tt_Home.gdb"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">
inNetwork </SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> r</SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;">"\NetworkDataset\NetworkDataset_New"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">
output_xml </SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">=</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> myPath </SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">+</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> </SPAN><SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;">"/myTemplate.xml"</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">
inNetwork arcpy</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">.</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">na</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">.</SPAN><SPAN class="" style="color: #2b91af; border: 0px; font-size: 13px;">CreateTemplateFromNetworkDataset</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">(</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">inNetwork</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">,</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> output_xml</SPAN><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;">)</SPAN>
The error I get is as below:
AttributeError: 'module' object has no attribute 'CreateTemplateFromNetworkDataset'