<?xml version="1.0" encoding="UTF-8"?><metadata>
<Esri>
<CreaDate>20220310</CreaDate>
<CreaTime>15324200</CreaTime>
<ArcGISFormat>1.0</ArcGISFormat>
<SyncOnce>TRUE</SyncOnce>
<ModDate>20260111</ModDate>
<ModTime>210637</ModTime>
</Esri>
<dataIdInfo>
<idCitation>
<resTitle>GetToolInfo</resTitle>
<date>
<createDate>20220310</createDate>
</date>
</idCitation>
<idAbs>
<para>
Get information such as the description of the network dataset used for the analysis and the execution limits for a tool in the geoprocessing service.
</para>
</idAbs>
<descKeys KeyTypCd="005">
<keyTyp>
<keyTyp>005</keyTyp>
</keyTyp>
<keyword/>
</descKeys>
</dataIdInfo>
<distInfo>
<distributor>
<distorFormat>
<formatName>ArcToolbox Tool</formatName>
</distorFormat>
</distributor>
</distInfo>
<mdDateSt>20220316</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="GetToolInfo" name="GetToolInfo" softwarerestriction="none" toolboxalias="NetworkAnalysisUtilities">
<summary>
<para>
Get information such as the description of the network dataset used for the analysis and the execution limits for a tool in the geoprocessing service.
</para>
</summary>
<alink_name>
GetToolInfo
_naservice</alink_name>
<parameters>
<param datatype="String" direction="Input" displayname="Service Name" expression="asyncRoute | asyncClosestFacility | asyncLocationAllocation | asyncODCostMatrix | asyncServiceArea | asyncVRP | syncVRP | asyncFleetRouting" name="serviceName" sync="true" type="Required">
<pythonReference>
<para>The service name containing the tool. The parameter value should be specified using one of the following keywords that reference a particular geoprocessing service:</para>
<para>
<bulletList>
<bullet_item> asyncClosestFacility—The asynchronous geoprocessing service used to perform the closest facility analysis. </bullet_item>
<bullet_item> asyncLocationAllocation—The asynchronous geoprocessing service used to perform the location-allocation analysis.</bullet_item>
<bullet_item> asyncRoute—The asynchronous geoprocessing service used to perform the route analysis.</bullet_item>
<bullet_item> asyncServiceArea—The asynchronous geoprocessing service used to perform the service area analysis.</bullet_item>
<bullet_item> asyncVRP—The asynchronous geoprocessing service used to perform the vehicle routing problem analysis.</bullet_item>
<bullet_item> syncVRP—The synchronous geoprocessing service used to perform the vehicle routing problem analysis.</bullet_item>
<bullet_item>asyncODCostMatrix—The asynchronous geoprocessing service used to perform the origin destination cost matrix analysis.</bullet_item>
</bulletList>
</para>
<para> The default value is asyncRoute.</para>
</pythonReference>
<dialogReference>
<para>The service name containing the tool. The parameter value should be specified using one of the following keywords that reference a particular geoprocessing service:</para>
<para>
<bulletList>
<bullet_item> asyncClosestFacility—The asynchronous geoprocessing service used to perform the closest facility analysis. </bullet_item>
<bullet_item> asyncLocationAllocation—The asynchronous geoprocessing service used to perform the location-allocation analysis.</bullet_item>
<bullet_item> asyncRoute—The asynchronous geoprocessing service used to perform the route analysis.</bullet_item>
<bullet_item> asyncServiceArea—The asynchronous geoprocessing service used to perform the service area analysis.</bullet_item>
<bullet_item> asyncVRP—The asynchronous geoprocessing service used to perform the vehicle routing problem analysis.</bullet_item>
<bullet_item> syncVRP—The synchronous geoprocessing service used to perform the vehicle routing problem analysis.</bullet_item>
<bullet_item>asyncODCostMatrix—The asynchronous geoprocessing service used to perform the origin destination cost matrix analysis.</bullet_item>
</bulletList>
</para>
<para> The default value is asyncRoute.</para>
</dialogReference>
</param>
<param datatype="String" direction="Input" displayname="Tool Name" expression="FindRoutes | EditVehicleRoutingProblem | FindClosestFacilities | GenerateOriginDestinationCostMatrix | GenerateServiceAreas | SolveLocationAllocation | SolveVehicleRoutingProblem | SolveLastMileDelivery" name="toolName" sync="true" type="Required">
<pythonReference>
<para>The tool name in the geoprocessing service. The parameter value should be a valid tool name in the geoprocessing service specified by the serviceName parameter. Valid tool names are as follows:</para>
<para>
<bulletList>
<bullet_item>FindClosestFacilities for the asyncClosestFacility service</bullet_item>
<bullet_item>SolveLocationAllocation for the asyncLocationAllocation service</bullet_item>
<bullet_item>FindRoutes for the Route service</bullet_item>
<bullet_item>GenerateServiceAreas for the asyncServiceArea service</bullet_item>
<bullet_item>SolveVehicleRoutingProblem for the asyncVRP service</bullet_item>
<bullet_item>EditVehicleRoutingProblem for the syncVRP service</bullet_item>
<bullet_item>GenerateOriginDestinationCostMatrix for the asyncODCostMatrix service</bullet_item>
</bulletList>
</para>
<para>The default value is FindRoutes.
</para>
</pythonReference>
<dialogReference>
<para>The tool name in the geoprocessing service. The parameter value should be a valid tool name in the geoprocessing service specified by the serviceName parameter. Valid tool names are as follows:</para>
<para>
<bulletList>
<bullet_item>FindClosestFacilities for the asyncClosestFacility service</bullet_item>
<bullet_item>SolveLocationAllocation for the asyncLocationAllocation service</bullet_item>
<bullet_item>FindRoutes for the Route service</bullet_item>
<bullet_item>GenerateServiceAreas for the asyncServiceArea service</bullet_item>
<bullet_item>SolveVehicleRoutingProblem for the asyncVRP service</bullet_item>
<bullet_item>EditVehicleRoutingProblem for the syncVRP service</bullet_item>
<bullet_item>GenerateOriginDestinationCostMatrix for the asyncODCostMatrix service</bullet_item>
</bulletList>
</para>
<para>The default value is FindRoutes.
</para>
</dialogReference>
</param>
<param datatype="Boolean" direction="Input" displayname="Include Network Source Info" expression="{includeNetworkSourceInfo}" name="includeNetworkSourceInfo" sync="true" type="Optional">
<pythonReference>
<para>Specify whether the information of all the source feature classes
that participate in the network dataset will be included. </para>
<bulletList>
<bullet_item>Checked—Information such as the
name, type, id, and the schema for all the source feature classes
that participate in the network dataset will be included.</bullet_item>
<bullet_item>Unchecked—The information will not be included. This is the default.</bullet_item>
</bulletList>
<para>
Specify whether the information of all the source feature classes
that participate in the network dataset will be included. <bulletList>
<bullet_item>
True—
<para>Information such as the
name, type, id, and the schema for all the source feature classes
that participate in the network dataset will be included.</para>
</bullet_item>
<bullet_item>
False—
<para>The information will not be included. This is the default.</para>
</bullet_item>
</bulletList>
</para>
</pythonReference>
<dialogReference>
<para>Specify whether the information of all the source feature classes
that participate in the network dataset will be included. </para>
<bulletList>
<bullet_item>Checked—Information such as the
name, type, id, and the schema for all the source feature classes
that participate in the network dataset will be included.</bullet_item>
<bullet_item>Unchecked—The information will not be included. This is the default.</bullet_item>
</bulletList>
</dialogReference>
</param>
</parameters>
<returnvalues/>
<environments/>
<usage>
<bullet_item>
<para>
The tool is meant to be used before executing other tools in the geoprocessing service. For example, if you need to identify the maximum number of stops supported by the FindRoutes tool, you can run GetToolInfo to determine the limit.
</para>
</bullet_item>
</usage>
<scriptExamples>
<scriptExample>
<title>GetToolInfo example</title>
<para>The following Python script demonstrates how to use the GetToolInfo tool in a script.</para>
<code xml:space="preserve">'''
The script shows how to use the GetToolInfo tool to get the maximum number of stops
that can be used as inputs with FindRoutes tool.
'''
import sys
import json
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 to get the limits for the FindRoutes tool result = arcpy.Utilities.GetToolInfo("asyncRoute", "FindRoutes")
#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 tool info and convert it to a dictionary
output_tool_info_json = result.getOutput(0)
output_tool_info_dict = json.loads(output_tool_info_json)
#Retrieve the maximum number of stops allowed by the service
max_stops = int(output_tool_info_dict["serviceLimits"]["maximumStops"])
arcpy.AddMessage("The maximum number of stops supported by the FindRoutes tool: {}" .format(max_stops))
</code>
</scriptExample>
</scriptExamples>
<shortdesc>Provides information such as the description of the network dataset used for the analysis and execution limits for a tool available in the geoprocessing service.
</shortdesc>
<arcToolboxHelpPath>withheld</arcToolboxHelpPath>
</tool>
</metadata>
