PlotWindow Object

The PlotWindow object represents a single plot document window.

Derived from: Window object(All methods and properties of Window apply to this object.)

The following table provides all properties of the PlotWindow object:

Property

Description

AutoRedraw

Enable/Disable Automatic Redraw.

HorizontalRuler

Returns the horizontal ruler object. It is a read-only property.

ShowGrid

Shows/hides the drawing grid.

ShowMargins

Show/hide the margin representation rectangle.

ShowPage

Shows/hides the page representation rectangle.

ShowRulers

Shows/hides rulers.

VerticalRuler

Returns the vertical ruler object. It is a read only property.

The following table provides all the methods of the PlotWindow object:

Method

Description

Redraw

Redraw the contents of this window.

Zoom

Zoom in or out.

ZoomPoint

Zoom in or out about a specified point.

ZoomRectangle

Zoom such that the specified rectangle occupies the entire window.

Example 1

This script displays all the methods and properties in the PlotWindow object.

Example 2

The following script demonstrates how the PlotWindow object is used in reference to the PlotDocument object.

Sub Main

'Declares SurferApp as an object

Dim SurferApp As Object

 

'Creates an instance of the Surfer Application object and assigns it to

'the variable named "SurferApp"

Set SurferApp = CreateObject("Surfer.Application")

 

'Makes Surfer visible

SurferApp.Visible = True

 

'Declares Plot as an object

Dim Plot As Object

 

'Creates a plot document in Surfer and assigns it to the variable named

'"Plot"

Set Plot = SurferApp.Documents.Add(srfDocPlot)

 

'Declares PlotWindow as an object

Dim PlotWindow As Object

 

'Assigns the new plot window to the variable named "PlotWindow"

Set PlotWindow = Plot.NewWindow

 

End Sub