Select to view content in your preferred language

PYT: Do tool descriptions, toolbox alias actually do anything?

56
1
Thursday
AlfredBaldenweck
MVP Regular Contributor

I've been writing PYTs for a few years now and I have yet to figure out what either of these properties (toolbox.alias and tool.description) actually do.

class Toolbox
    def __init__(self):
        """Define the toolbox (the name of the toolbox is the name of the
        .pyt file)."""
        self.label = "Toolbox"
        self.alias = "toolbox" # ????????

        # List of tool classes associated with this toolbox
        self.tools = [tool1]
class tool1:
    def __init__(self):
        """Define the tool (tool name is the name of the class)."""
        self.label = "Tool1 Name"
        self.description = "Does this do anything?" #???????
        self.category = "Cat1"

 

tool.description is mentioned here Tool definitions in a Python toolbox—ArcGIS Pro | Documentation but like. is it exposed to the user at all? I thought it might be in the little Question Mark button, but that's empty and I expect only gets filled by the Metadata XML. Why should I use this?

AlfredBaldenweck_1-1725545374517.png

Same thing for toolbox.alias-- What is it used for? 

 

0 Kudos
1 Reply
DanPatterson
MVP Esteemed Contributor

The purpose of the alias is described here

Add toolboxes in Python—ArcGIS Pro | Documentation

As for the description, I find it useful whenyou want to find out more about a tool.  right-click on the tool and select properties.  Tool info is fully at hand.  


... sort of retired...