I would like to print a list of Toolboxes as listed in my Python code, however I would also like to print the tools in that Toolbox under neath the Toolbox name like so;
Analysis Tools(analysis)
Buffer_analysis
Clip_analysis
Data Management Tools(management)
DeleteRows_management
CopyRows_management
Here is the python code I have so far, but, when i run it it just prints a list of the Toolboxes without the tools that belong to them. Here is my code;
import arcpy
toolboxes = arcpy.ListToolboxes()
for toolbox in toolboxes:
print( toolbox)
toolbox = "Analysis Tools(analysis)" + \
"Data Management Tools(management)" + \
"3D Analyst Tools(3d)" + \
"Cartography Tools(cartography)" + \
"Conversion Tools(conversion)" + \
"Geocoding Tools(geocoding)" + \
"Geostatistical Analyst Tools(ga)" + \
"Linear Referencing Tools(Ir)" + \
"Spatial Analyst Tools(sa)" + \
"Spatial Statistics Tools(stats)" + \
"Coverage Tools(arc)"
startIndex = toolbox.find("(")
startIndex = toolbox.find("B")
tools = arcpy.ListTools("*_analysis" + \
"*_management" + \
"*_3d" + \
"*_cartography" + \
"*_conversion" + \
"*_geocoding" + \
"*_ga" + \
"*_Ir" + \
"*_sa" + \
"*_stats" + \
"*_arc")
print("/t + toolbox")
Aucun commentaire:
Enregistrer un commentaire