Clearing Standard Information¶
Clearing Standard Information¶
1# This example demonstrates how to determine information about the standard used to create a layer
2# It also shows how to clear the standard information, and any variables as well.
3
4if not impact.active_drawing.isNone():
5 ot = impact.gui.output_toolbox
6
7 ot.clear()
8
9 if impact.active_drawing.active_layer.standard_name == "":
10 ot.add("Layer contains no standard information")
11
12 else:
13 ot.add("Standard: " + str(impact.active_drawing.active_layer.standard_name))
14 ot.add("Parametric Construction: " + str(impact.active_drawing.active_layer.standard_is_parametric))
15 ot.add("Construction description: " + str(impact.active_drawing.active_layer.standard_construction))
16 ot.add("Board Type: " + str(impact.active_drawing.active_layer.standard_board_type))
17
18 # clear standard information and delete all non-material variables
19 impact.active_drawing.active_layer.standard_clear_information()
20 impact.active_drawing.active_layer.variables.delete_all_except_material_variables()