Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mygptool
- class MyGPTool(object):
- def __init__(self):
- """Define the tool (tool name is the name of the class)."""
- self.label = "MyGPTool"
- self.description = "Does my stuff!"
- def getParameterInfo(self):
- """Define parameter definitions"""
- return [arcpy.Parameter(displayName="State (Abbreviation)"
- ,name="state_abbreviation"
- ,datatype="GPString"
- ,parameterType="Required"
- ,direction="Input"
- )]
- # Boilerplate isLicensed, updateParameters, updateMessages methods
- def execute(self, parameters, messages):
- """The source code of the tool."""
- state_abbreviation = parameters[0].valueAsText
- mygptool.run_my_tool(state_abbreviation)
- return
- arcpy.Parameter(displayName="My Database"
- ,name="smart_db"
- ,datatype="DEWorkspace"
- ,parameterType="Required"
- ,direction="Input"
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement