-
Notifications
You must be signed in to change notification settings - Fork 0
/
Example Toolbox.pyt
41 lines (31 loc) · 879 Bytes
/
Example 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
34
35
36
37
38
39
40
41
from importlib import reload, invalidate_caches
invalidate_caches()
import utils.dev
reload(utils.dev)
from utils.dev import import_tools
import utils.arcpy_tools
reload(utils.arcpy_tools)
import utils.constants
reload(utils.constants)
import utils.excel_tools
reload(utils.excel_tools)
import utils.tool
reload(utils.tool)
TOOLS = \
{
"tools.project":
[
"ExampleTool",
"FailingTool",
],
}
IMPORTS = import_tools(TOOLS)
globals().update({tool.__name__: tool for tool in IMPORTS})
class Toolbox(object):
def __init__(self):
"""Define the toolbox (the name of the toolbox is the name of the
.pyt file)."""
self.label = "Example Toolbox"
self.alias = "ExampleToolbox"
# List of tool classes associated with this toolbox
self.tools = [ExampleTool, FailingTool]