Example¶
Example¶
1# This example to change thickness of all the 3d models 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 scene is not None:
8 for instance in scene.instances:
9 object = instance.object()
10
11 if object is not None:
12 if object.type == ip3DObjectType.ot3DModel:
13 model = object
14 impact.gui.output_toolbox.add("Models thickness before:")
15 impact.gui.output_toolbox.add(model.thickness)
16 model.thickness = 3
17 impact.gui.output_toolbox.add("Models thickness after:")
18 impact.gui.output_toolbox.add(model.thickness)
19
20 else:
21 impact.gui.output_toolbox.add("No 3d scene")