Get layout information¶
Get layout information¶
1# this example gets report information about the layout in the active multi-up layer
2
3# create an ILayoutResults object
4results = impact.creator.layout_results()
5
6# generate a report
7lay = impact.active_drawing.active_layer
8if lay.layer_type == "MULTI_UP":
9 lay.layout_report(results)
10 if results.number_up > 0:
11 ot = impact.gui.output_toolbox
12 ot.clear()
13 ot.add("Layout: " + str(results.layout().full_name))
14 ot.add("Number Up: " + str(results.number_up))
15 ot.add("Fitted Sheet X: " + str(results.fitted_sheet_x))
16 ot.add("Fitted Sheet Y: " + str(results.fitted_sheet_y))
17 ot.add("Rule X: " + str(results.rule_x))
18 ot.add("Rule Y: " + str(results.rule_y))
19 ot.add("Fitted Sheet (%): " + str(results.fitted_sheet_percent))
20 ot.add("Stock Sheet (%): " + str(results.stock_sheet_percent))
21 ot.add("Stock Sheet X: " + str(results.stock_sheet_x))
22 ot.add("Stock Sheet Y: " + str(results.stock_sheet_y))
23 ot.add("Used Area: " + str(results.used_area))
24 else:
25 impact.gui.output_toolbox.add("The layer doesn't appear to contain a layout")
26