Display Standard Wizard¶
Display Standard Wizard¶
1# This example shows how to specify a standard and default
2# values to display in the standard wizard
3
4# Create a local variable for the output toolbox
5ot = impact.gui.output_toolbox
6
7# Clear the output toolbox
8ot.clear()
9
10# Create a local variable for the active database
11db = impact.active_database
12
13# Note: You should always assign impact.active_database.standard_creator
14# to a local variable
15sc = db.standard_creator
16
17# Set the name of the standard to create
18sc.standard = "FEFCO 0201"
19
20# Set the material
21sc.material_mts = db.find_master_tool_setting("Corrugated|C Flute", ipMasterSettingType.mstMaterial)
22
23# Check that the IStandardCreator.create() method can be called successfully
24if sc.valid:
25
26 # Set some of the variables
27 sc.variable_settings.variables.item("L").value = 100.00
28 sc.variable_settings.variables.item("W").value = 200.00
29 sc.variable_settings.variables.item("D").value = 150.00
30
31 # Override some of the options
32 sc.delete_parametric_dimensions = True
33 sc.add_overall_dimensions = True
34 sc.dimension_horizontal_position = ipHorzTextPos.htpLeft
35 sc.dimension_vertical_position = ipVertTextPos.vtpTop
36
37 sc.display_wizard = True
38
39 # Create the standard
40 sc.create()
41
42else:
43
44 # Add an error message to the output toolbox
45 ot.add("Unable to load the standard " + str(sc.standard()))