Printing

From Planimate Knowledge Base
Jump to navigation Jump to search

Printing a Panel can be achieved by using the Change Object with File mode 'Save Window Image', and also including a broadcast receiver for the broadcast '_Page Printed' when panel printing complete.

Basic:

1) Add a Panel to the Panel List (right click on panel and select from the Dynamic Panel Properties menu 'Add To Panel List'. 2) Create an entry, change object, and exit. Link all with a flow. Change mode of entry to Upon Click (and continue), and rename as Capture. 3) For the change object select File, and change the Mode to 'Save Window Image'. 4) A window browser will appear; type the name to be used when saving in the 'File name:' section. 4) In the change object Options select 'Show file browser first' if you would like the user to be able to name the file , and/or save the image to another folder. 5) In the change object Data Targets select Add New. From the Attribute Reference Selector in Mode Value change the Attribute Type to Label and select _Model Panels from the list. For the Name select from the list the panel added in step one.

6) Create a entry and exit. Link all with a flow. 7) Change the entry mode to Receive Broadcast, adn select _Page Printed from the list. Note: this broadcast is received from the system when the page has been printed.

Wiki printingpanel.gif

8) Go to Planimate run mode and click the Capture entry. 9) Navigate to folder where image was saved and view captured panel image.

Extra

Multiple Printing If you are looking to print multiple panels (pages) at once, you can setup a master printing table with each row detailing the panel to be printed, and

in the change object Option select 'Dynamic filename'. 1) Create a table 'Printing Reference' with a column for panels to be printed using the '_Model Panels' label list. 2) Set a Portal Attribute 'Print' with the units Label and use the label list "_Model Panels'. 3) Create a change object which sets the p.Print Row = 1. This is the index for the reference table. 4) Create a change object which sets the p.Print = t.Printing Reference [p.Print Row][c.Model Panel]. Place this before the capture object in the

flow. 5) After the _Page Printed entry create a Switch (condition) that checks if reached the end of the printing reference table for printing panels IF p.Print Row = p.Printing Reference.RowCount. 6) If at end of table flow to exit, ELSE create another flow to a new change object to increments p.Print Row. 7) Create a new change object which sets the p.Print = t.Printing Reference [p.Print Row][c.Model Panel]. 8) Create a new capture object and exit.

Printing Table with Rows Greater Than Viewable on a Panel: 1) Add a columns to the table 'Printing Reference' - c.Visual Rows c.Rows Printed c.Row Count 2) Create a settings change object after the entry to setup the details. c.Visual Rows = use 'TableViewVisibleRows' operation c.Rows Printed = 0 c.Row Count =use Set To 'Table Property Row Count'. 3) After the _Page Printed entry create a change object to populate c.Rows Printed = use the Visual Row cell details in the table 'Printing Reference'. 4) Add a switch to check if Rows Printed <= Row Count. If Yes, need to create a flow to another capture object and exit, or No flow change object to increment p.Print Row (go to next row in table).

Wiki printreference.gif