-
Notifications
You must be signed in to change notification settings - Fork 1
/
FilteredExport.py
64 lines (52 loc) · 1.93 KB
/
FilteredExport.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Importing sample Fusion Command
# Could import multiple Command definitions here
from .FilteredExportAsStlCommand import FilteredExportAsStlCommand
from .FilteredExportSaveCopyAs import FilteredExportSaveCopyAs
from .FilteredExportStp import FilteredExportStp
commands = []
command_definitions = []
# Define parameters for stl export command
cmd = {
'cmd_name': 'Filtered STL Export',
'cmd_description': 'Exports all or selected components without creating duplicate exports',
'cmd_id': 'cmdID_filteredExportStl08',
'cmd_resources': './resources/exportStl',
'workspace': 'FusionSolidEnvironment',
'toolbar_panel_id': 'SolidScriptsAddinsPanel',
'class': FilteredExportAsStlCommand
}
command_definitions.append(cmd)
# Define parameters for stp export command
cmd = {
'cmd_name': 'Filtered STP Export',
'cmd_description': 'Export of all or selected components',
'cmd_id': 'cmdID_filteredStpExport10',
'cmd_resources': './resources/exportStp',
'workspace': 'FusionSolidEnvironment',
'toolbar_panel_id': 'SolidScriptsAddinsPanel',
'class': FilteredExportStp
}
command_definitions.append(cmd)
# Define parameters for save copy as command
cmd = {
'cmd_name': 'Filtered Save Copy As',
'cmd_description': 'Saves a copy of all or selected components',
'cmd_id': 'cmdID_filteredCopyAs09',
'cmd_resources': './resources/saveCopyAs',
'workspace': 'FusionSolidEnvironment',
'toolbar_panel_id': 'SolidScriptsAddinsPanel',
'class': FilteredExportSaveCopyAs
}
command_definitions.append(cmd)
# Set to True to display various useful messages when debugging your app
debug = False
# Don't change anything below here:
for cmd_def in command_definitions:
command = cmd_def['class'](cmd_def, debug)
commands.append(command)
def run(context):
for run_command in commands:
run_command.on_run()
def stop(context):
for stop_command in commands:
stop_command.on_stop()