system.print.createPrintJob

anyone have an example of how to use scripting function system.print.createPrintJob() to print a screen?

I want to automatically print a window with an EasyChart based on an event from scripting.

Thanks

There’s an example in the docs. Could you tell us what you need to know that’s not in the example?

The example is attached to a button. My requirement is I need to on an event, open a window with an Easy Chart, then print that chart.

This is a an application were Ignition is logging data for several CIP ( Clean In Place ) systems. On completion of a CIP program I need Ignition to populate an Easy Chart with the CIP run data, then print.

I know how to get the CIP run chart data to display on completion, just can’t figure out how to use the script function system.print.createPrintJob() after opening a Window with the CIP run data.

Figured it out on my own. Since I am automatically switching to the screen to print, just need to pass ‘Root Container’ as the parameter:
job = system.print.createPrintJob(‘Root Container’)