<?xml version="1.0" encoding="UTF-8"?><metadata>
<Esri>
<CreaDate>20190423</CreaDate>
<CreaTime>13041100</CreaTime>
<ArcGISFormat>1.0</ArcGISFormat>
<SyncOnce>TRUE</SyncOnce>
<ModDate>20260108</ModDate>
<ModTime>145541</ModTime>
</Esri>
<dataIdInfo>
<idCitation>
<resTitle>GetTravelModes</resTitle>
<date>
<createDate>20190423</createDate>
</date>
</idCitation>
<idAbs>
<para>
Get a list of travel modes configured for your organization that can be used with ArcGIS Online network analysis services. A travel mode represents a means of transportation, such as driving or walking. Travel modes are essentially templates consisting of a long list of travel settings.</para>
</idAbs>
<descKeys KeyTypCd="005">
<keyTyp>
<keyTyp>005</keyTyp>
</keyTyp>
<keyword/>
</descKeys>
</dataIdInfo>
<distInfo>
<distributor>
<distorFormat>
<formatName>ArcToolbox Tool</formatName>
</distorFormat>
</distributor>
</distInfo>
<mdDateSt>20191023</mdDateSt>
<mdContact>
<rpOrgName>Environmental Systems Research Institute, Inc. (Esri)</rpOrgName>
<rpCntInfo>
<cntAddress>
<delPoint>380 New York Street</delPoint>
<city>Redlands</city>
<adminArea>California</adminArea>
<postCode>92373-8100</postCode>
<eMailAdd>info@esri.com</eMailAdd>
<country>United States</country>
</cntAddress>
<cntPhone>
<voiceNum>909-793-2853</voiceNum>
<faxNum>909-793-5953</faxNum>
</cntPhone>
<cntOnlineRes>
<linkage>http://www.esri.com</linkage>
</cntOnlineRes>
</rpCntInfo>
<role>
<RoleCd>007</RoleCd>
</role>
</mdContact>
<tool displayname="GetTravelModes" name="GetTravelModes" softwarerestriction="none" toolboxalias="NetworkAnalysisUtilities">
<summary>
<para>
Get a list of travel modes configured for your organization that can be used with ArcGIS Online network analysis services. A travel mode represents a means of transportation, such as driving or walking. Travel modes are essentially templates consisting of a long list of travel settings.</para>
</summary>
<alink_name>
GetTravelModes
_naservice</alink_name>
<parameters/>
<returnvalues/>
<environments/>
<usage>
<bullet_item>
Upon execution, the tool adds a table, Supported Travel Modes, to the application. Any value in the Travel Mode Name field from the Supported Travel Modes table can be specified as input to the travel_mode parameter supported by various tools, such as FindRoutes, in the geoprocessing service. You can also specify the value from the Travel Mode Settings field as input to the travel_mode parameter. This speeds up the execution of the tool used, such as FindRoutes, because the tool does not have to look up the settings based on the travel mode name.
</bullet_item>
<bullet_item>
<para>The tool does not support any input parameters</para>
</bullet_item>
</usage>
<scriptExamples>
<scriptExample>
<title>GetTravelModes example</title>
<para>The following Python script demonstrates how to use the GetTravelModes tool in a script.</para>
<code xml:space="preserve">'''
The script shows how to use the GetTravelModes tool to get a list of travel modes supported by your
ArcGIS Online organization.
'''
import sys
import arcpy
#Change the username and password applicable to your own ArcGIS Online account
username = "&lt;your user name&gt;"
password = "&lt;your password&gt;"
utility_service = "https://logistics.arcgis.com/arcgis/services;World/Utilities;{0};{1}".format(username, password)
#Add the geoprocessing service as a toolbox.
arcpy.ImportToolbox(utility_service)
#Call the tool
result = arcpy.Utilities.GetTravelModes()
#Print any warning or error messages returned from the tool
result_severity = arcpy.GetMaxSeverity()
if result_severity == 2:
arcpy.AddMessage("An error occured when running the tool")
arcpy.AddMessage(arcpy.GetMessages(2))
sys.exit(2)
elif result_severity == 1:
arcpy.AddMessage("Warnings were returned when running the tool")
arcpy.AddMessage(arcpy.GetMessages(1))
#Retrieve the travel mode table
output_tm_table = result.getOutput(0)
#Save the travel mode table in memory.
output_tm_table.save("in_memory/TravelModes")
#Use a cursor to build a list of travel mode names from the table
arcpy.AddMessage("Travel Modes configured for your organization")
travel_mode_names = []
with arcpy.da.SearchCursor(output_tm_table, ["Name"]) as cursor:
for row in cursor:
travel_mode_names.append(row[0])
arcpy.AddMessage(row[0])
</code>
</scriptExample>
</scriptExamples>
<shortdesc>
Get a list of travel modes defined for your organization that can be used with directions and routing services available in ArcGIS Online.
</shortdesc>
<arcToolboxHelpPath>withheld</arcToolboxHelpPath>
</tool>
</metadata>
