Change visibility of palette¶
Change visibility of palette¶
1# this script changes the visibility of all palettes whose name begins with Cut/Crease
2
3# if any matching palettes are found, they are returned as an array (not a collection)
4pals = impact.active_drawing.palettes.find_palettes("^Cut/Crease")
5
6# it is necessary to check that some palettes were found
7if pals:
8
9 # iterate through the array
10 for i in range(0, len(pals) - 1 + 1):
11 impact.gui.output_toolbox.add(pals[i].full_name)
12
13 # make palette invisible
14 pals[i].visible = ipBoolean.bFalse
15else:
16 impact.gui.output_toolbox.add("no matching palettes found")