Describing all drawing text style sheets

Describing all drawing text style sheets
 1# This example iterates all the text style sheets for
 2# the active drawing and describes each one and also
 3# the text style sheet it is based on (if any)
 4
 5
 6style_sheets = impact.active_drawing.text_style_sheets
 7
 8# the text style sheet it is based on (if any)
 9def describe_style_sheet(style_sheet):
10    impact.gui.output_toolbox.add("Style Sheet: " + style_sheet.full_name)
11
12    based_on_style_sheet = style_sheet.text_style.style_sheet
13
14    if based_on_style_sheet is not None:
15        impact.gui.output_toolbox.add("Based on...")
16        describe_style_sheet(based_on_style_sheet)
17
18
19impact.gui.output_toolbox.clear()
20
21impact.gui.output_toolbox.add("---------- Drawing Text Style Sheets ----------")
22
23style_sheets = impact.active_drawing.text_style_sheets
24
25for style_sheet in style_sheets:
26    impact.gui.output_toolbox.add("")
27    describe_style_sheet(style_sheet)