Access toolbox Description from arcpy?

133
2
Jump to solution
01-12-2022 06:52 AM
GB_MattPanunto_GISS
Occasional Contributor

Is it possible to grab a toolbox description via arcpy? Or maybe by using another library?

Description.png

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

 

Just about everything but

import arcpy
pth = r"C:\arcpro_npg\npg_tools.tbx"
t0 = arcpy.ImportToolbox(t)
arcpy.Usage(t0)
tools = arcpy.ListTools(t0)
for tool in tools:
    print(arcpy.Usage(tool))
# --
AttributeSort_npg({Tool}, Input_features, Sort_fields;Sort_fields..., {Output_field})
... snip ...
Triangulate_npg(Tool, Input_Features, Output_Features, {Polygon | Polyline}, {True | False})
# --
t1 = tools[0]
help(arcpy.AttributeSort_npg)
Help on function AttributeSort:

AttributeSort(Tool=None, Input_features=None, Sort_fields=None, Output_field=None)
    AttributeSort_npg({Tool}, Input_features, Sort_fields;Sort_fields..., {Output_field})
    
       Sort by attributes.
    
    INPUTS:
     Tool {String}:
         Tool being used. Informational only.
     Input_features (Table View):
         The feature attributes to sort. Select a layer if prior selections
         are to be honored.
     Sort_fields (Field):
         Fields to sort on, in order of importance.
     Output_field {String}:
         The field to create to contain the sort results.

 


... sort of retired...

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

 

Just about everything but

import arcpy
pth = r"C:\arcpro_npg\npg_tools.tbx"
t0 = arcpy.ImportToolbox(t)
arcpy.Usage(t0)
tools = arcpy.ListTools(t0)
for tool in tools:
    print(arcpy.Usage(tool))
# --
AttributeSort_npg({Tool}, Input_features, Sort_fields;Sort_fields..., {Output_field})
... snip ...
Triangulate_npg(Tool, Input_Features, Output_Features, {Polygon | Polyline}, {True | False})
# --
t1 = tools[0]
help(arcpy.AttributeSort_npg)
Help on function AttributeSort:

AttributeSort(Tool=None, Input_features=None, Sort_fields=None, Output_field=None)
    AttributeSort_npg({Tool}, Input_features, Sort_fields;Sort_fields..., {Output_field})
    
       Sort by attributes.
    
    INPUTS:
     Tool {String}:
         Tool being used. Informational only.
     Input_features (Table View):
         The feature attributes to sort. Select a layer if prior selections
         are to be honored.
     Sort_fields (Field):
         Fields to sort on, in order of importance.
     Output_field {String}:
         The field to create to contain the sort results.

 


... sort of retired...
0 Kudos
GB_MattPanunto_GISS
Occasional Contributor

arcpy.Usage() works great after importing the toolbox, thanks!

0 Kudos