Running a border plot¶
Running a border plot¶
1# This example creates a border plot
2
3# Create a local variable for the impact.gui
4g = impact.gui
5
6# create a local variable for the output toolbox
7ot = g.output_toolbox
8
9# Clear the output toolbox
10ot.clear()
11
12# Create a local variable for the active drawing
13ad = impact.active_drawing
14
15# Check there is an active drawing
16if ad.isNone():
17
18 # Display an error message in the output toolbox
19 ot.add("Unable to continue: no active drawing")
20
21else:
22
23 # Create a local variable for the name of the settings to use
24 settings_name = "One Up Drawing Specification"
25
26 # Attempt to find the settings to use
27 settings = impact.active_database.find_master_tool_setting(settings_name, ipMasterSettingType.mstBorderPlot)
28
29 # Check the settings were found
30 if settings.isNone():
31
32 # Display an error message in the output toolbox
33 ot.add("Unable to continue: can't locate hole finder settings '" + str(settings_name) + "'")
34
35 else:
36
37 # run the border plot
38 g.run_border_plot2(settings)
39
40
41