Ruler Object

 

The Ruler object contains the properties for the horizontal and vertical rulers in the map window.

 

Properties

Application

GridDivisions

Parent

RulerDivisions

ShowPosition

SnapToRuler

 

Example

The following script demonstrates how the Ruler object is referenced.

 

Sub Main

'Declares mvApp as an object

 Dim mvApp As Object

 

'Creates an instance of the MapViewer Application

'object and assigns it to the variable named "mvApp"

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes MapViewer visible

 mvApp.Visible = True

 

'Declares Plot as an object

 Dim Plot As Object

 

'Creates a PlotDocument object in MapViewer

'and assigns it to the variable named "Plot"

 Set Plot = mvApp.Documents.Add(mvDocPlot)

 

'Declares Windows as an object

 Dim Windows As Object

 

'Assigns the Windows Collection to the

'variable named "Windows"

 Set Windows = mvApp.Windows(1)

 

'Declares Ruler as an object

 Dim Ruler As Object

 

'Returns a reference to the vertical ruler

 Set Ruler = Windows.VerticalRuler

End Sub