Displaying the last plot operation

Displaying the last plot operation
 1# This example displays the latest plot information in the output toolbox
 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 latest plot context
13plot_context = g.tools.active_plot_context
14
15# Check there is a plot context
16if not plot_context.isNone():
17
18    # Display the latest plot information in the output toolbox
19    ot.add("Project name: " + str(plot_context.drawing.full_name))
20    ot.add("Layer name: " + str(plot_context.layer.full_name))
21    ot.add("Plot machine: " + str(plot_context.plot_machine.full_name))
22    ot.add("Post processor: " + str(plot_context.post_processor.full_name))
23    ot.add("Feedrate table: " + str(plot_context.feed_rate_table))
24    ot.add("Specials name: " + str(plot_context.specials_name))
25    ot.add("First subroutine number: " + str(plot_context.first_subroutine_number))
26    ot.add("Rotation angle: " + str(plot_context.rotation_angle))
27    ot.add("Mirror X: " + str(plot_context.mirror_x))
28    ot.add("Did plot: " + str(plot_context.did_plot))
29    ot.add("Output from type: " + str(plot_context.output_from_type))
30    ot.add("Use sheet feeder: " + str(plot_context.use_sheet_feeder))
31    ot.add("Number of sheets to be fed: " + str(plot_context.number_sheets_to_be_fed))
32    ot.add("Form feed distance: " + str(plot_context.form_feed_distance))
33    ot.add("Inside diameter: " + str(plot_context.rotary_inside_diameter))
34    ot.add("Knife height: " + str(plot_context.rotary_knife_height))
35    ot.add("Cutting depth: " + str(plot_context.rotary_cutting_depth))
36    ot.add("Wood thickness: " + str(plot_context.rotary_wood_thickness))
37    ot.add("Calculated from: " + str(plot_context.rotary_calculated_from))
38    ot.add("Result: " + str(plot_context.rotary_result))
39    ot.add("Coefficient: " + str(plot_context.rotary_coefficient))
40    ot.add("Sheet scale: " + str(plot_context.sheet_scale))
41    ot.add("Sheet origin: " + str(plot_context.sheet_origin))
42    ot.add("Location hole radius: " + str(plot_context.location_hole_radius))
43    ot.add("Mount board thickness: " + str(plot_context.mount_board_thickness))
44    ot.add("Z-Axis offset amount: " + str(plot_context.z_axis_offset_amount))
45
46else:
47
48    # An an error message to the output toolbox
49    ot.add("Unable to access the active plot context")