/
grid_toolbox.pyt
33 lines (27 loc) · 1.03 KB
/
grid_toolbox.pyt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Python Tool box for archaeology
# Copyright (c)2017 Brian Wilson <brian@wildsong.biz>
#
import arcpy
from shoveltesttool import ShovelTest_Tool
class Toolbox(object):
def __init__(self):
"""Define the toolbox (the name of the toolbox is the name of this .pyt file)."""
self.label = "Archy Toolbox"
self.alias = ""
self.description = """Toolbox containing a grid tool for archaeology"""
# List of tool classes associated with this toolbox
self.tools = [ShovelTest_Tool]
if __name__ == "__main__":
# Running this as a standalone script tells what I know about the toolbox.
toolbox = Toolbox()
print "toolbox:",toolbox.label
print "description:",toolbox.description
print "tools:"
for t in toolbox.tools:
tool = t()
print ' ',tool.label
print ' description:', tool.description
for param in tool.getParameterInfo():
print ' ',param.name,':',param.displayName
exit(0)
# That's all!