Follow

How can I print all of the open windows in Grapher using Scripter?

This article contains a sample script for printing all plot documents, worksheets, and grids that are currently open in the Grapher program.

To run this script:

  1. Copy the script below, or click here to download the BAS file: printallopenwindows.BAS.
  2. In a Windows Explorer window, navigate to C:\Program Files\Golden Software\Grapher 12\Scripter.
  3. Double click on Scripter.exe to launch Scripter.
  4. Press Ctrl+A to select all of the existing lines then press Delete.
  5. If you copied this script, press Ctrl+V to paste it into Scripter. If you downloaded it, click File | Open, select the BAS file from your downloads directory, and click Open.
  6. Click Script | Run to run the script.
     

*********

'This script prints all open Grapher plot and worksheet windows

Sub Main

  'Create Grapher as an object
  Dim Grapher As Object

  'Start Grapher
  Set Grapher = CreateObject("Grapher.Application")

  'Make Grapher visible
  Grapher.Visible = True

  'Print all graphs that are currently open
	i=1
    While i < Grapher.Documents.Count+1

    'Step through each of the open windows and print
    Grapher.Documents.Item(i).PrintOut

    'uncomment the next line if you want the script to close the window
    'doc.Close()

    'Open the next file
    i = i+1
  Wend

End Sub

 

Updated October 28, 2016

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.