Geoprocessing.ExecuteToolAsync - ToolPath

983
4
Jump to solution
05-13-2022 07:32 AM
JohnStallings
New Contributor II

This most likely has already been asked and answered however, I am having troubles locating any documentation on the ToolPath.

In some Samples I see: Geoprocessing.ExecuteToolAsync("management...", ...) While in others I see Geoprocessing.ExecuteToolAsync("gp...", ...), and still in others I see Geoprocessing.ExecuteToolAsync("Analysis...", ...).

Where can I find documentation to the toolPath as referenced to in the API Reference guide? 

cited from the API Reference Guide under Parameters: toolPath - 

Use toolboxalias.toolname, toolname_toolboxalias pattern or full path (Where can I find this information?)

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

To get the toolpath of a specific tool, I use the ArcGIS Pro geoprocessing tool reference page by selecting the tool (say, Create Feature Class) and examining its Python parameters. There you'll see that the tool path is "arcpy.management.CreateFeatureclass" and you just remove the "arcpy." part. You could also use "CreateFeatureclass_management", but I find the dot syntax easier to comprehend.

View solution in original post

0 Kudos
4 Replies
KenBuja
MVP Esteemed Contributor

To get the toolpath of a specific tool, I use the ArcGIS Pro geoprocessing tool reference page by selecting the tool (say, Create Feature Class) and examining its Python parameters. There you'll see that the tool path is "arcpy.management.CreateFeatureclass" and you just remove the "arcpy." part. You could also use "CreateFeatureclass_management", but I find the dot syntax easier to comprehend.

0 Kudos
JohnStallings
New Contributor II

@KenBuja ,

Just to make sure I am picking up what you are putting down for me...

If I wanted to send the Locate Features Along a Route to the GP. I would lookup the tool Find the ArcPy Call then remove the ArcPy?

Example: arcpy.LocateFeaturesAlongRoutes_lr = Geoprocessing.ExecuteToolAsync("LocateFeaturesAlongRoutes_lr",...,...);

0 Kudos
KenBuja
MVP Esteemed Contributor

Yes, that's correct. Either "LocateFeaturesAlongRoutes_lr" or "lr.LocateFeaturesAlongRoutes" will work.

0 Kudos
JohnStallings
New Contributor II

Thank you!

0 Kudos