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 |
Enable/Disable Automatic Redraw. |
|
Returns the horizontal ruler object. It is a read-only property. |
|
Shows/hides the drawing grid. |
|
Show/hide the margin representation rectangle. |
|
Shows/hides the page representation rectangle. |
|
Shows/hides rulers. |
|
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 the contents of this window. |
|
Zoom in or out. |
|
Zoom in or out about a specified point. |
|
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