Extents example (Python)

Extents example (Python)
 1# this example displays the extents of the active block in the
 2# output toolbox
 3if impact.active_drawing.isNone():
 4
 5    # display a message in the output toolbox
 6    impact.gui.output_toolbox.add("Unable to continue: there is no active drawing")
 7
 8else:
 9
10    # create a local variable for the active block
11    ab = impact.active_drawing.active_layer.active_block
12
13    # display the extents in the output toolbox
14    impact.gui.output_toolbox.add(ab.extents.to_string())