ArcGIS Pro 3.1
Is it possible to loop through all the geoprocessing tools in ArcGIS Pro and create a list of all their parameter names?
For example, find all GP tools that have a parameter called Output Location or Output Name.
Related: Consistent path and filename parameters in GP tools
To use your example of Export Features
The tool parameters are located in
C:\...Your install path...\Resources\ArcToolBox\toolboxes\Conversion Tools.tbx\ExportFeatures.tool\tool.content
You would need to parse the ArcToolBox\toolboxes folders, looking the tools in each toolset (*.tbx) , navigate into the particular tool (eg. ExportFeatures.tool) then open the file (tool.content) and look for the line containing params , For example
..... snip
"params": {
"in_features": {
"displayname": "$rc:in_features.title",
"datatype": {
"type": "GPFeatureLayer"
},
"description": "$rc:in_features.descr"
},
"out_features": {
"direction": "out",
"displayname": "$rc:out_features.title",
"datatype": {
"type": "DEFeatureClass"
},
"depends": [
"in_features"
],
"description": "$rc:out_features.descr"
.... snip
doeable, but it might tie up your machine for a while
for tool in arcpy.ListTools("*"):
params = arcpy.GetParameterInfo(tool)
for param in params:
if param.name == "output_location" or param.name == "output_name":
print(tool, param.name)
@DannyMcVey 😁 he would discover so much more examining the actual folders