Describing all text style sheets

Describing all 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# the text style sheet it is based on (if any)
 6def describe_style_sheet(style_sheet):
 7    impact.gui.output_toolbox.add("Style Sheet: " + style_sheet.full_name)
 8
 9    based_on_style_sheet = style_sheet.text_style.style_sheet
10
11    if not based_on_style_sheet.isNone():
12        impact.gui.output_toolbox.add("Based on...")
13        describe_style_sheet(based_on_style_sheet)
14
15
16impact.gui.output_toolbox.clear()
17
18impact.gui.output_toolbox.add("---------- Drawing Text Style Sheets ----------")
19
20style_sheets = active_drawing.text_style_sheets
21
22for style_sheet in style_sheets:
23    impact.gui.output_toolbox.add("")
24    describe_style_sheet(style_sheet)