Get Instance Extents

Get Instance Extents
 1# This example prints extent of all the 3D instance in all the 3D layers in the active drawing.
 2
 3for layer in impact.active_drawing.layers:
 4    if layer.layer_type == "THREE_D":
 5        scene = layer.scene
 6
 7        if not scene.isNone():
 8            for instance in scene.instances:
 9
10                # Gets the extent
11                r = instance.extents
12
13                # Prints the extent
14                impact.gui.output_toolbox.add(r.to_string())
15
16        else:
17            impact.gui.output_toolbox.add("No 3d scene")
18