Projection Object

 

The Projection object contains all the methods and properties of projections.  

 

In order to convert a map document's projection, it is necessary to make a copy of the current map document projection with the CopyDocProjection method. Make the desired changes to the copy of the projection, apply the new changes with the ConvertProjection method, and then delete the copy of the projection. NOTE: It is important to delete the copy of the projection created with CopyDocProjection when you are done with it. If the projection copy is not deleted, the MapViewer application process will run even after MapViewer and Scripter are closed.

 

Properties

Application

ApplyOffset

AzimuthDegrees

CartesianCoord

CentralLat

CentralLon

CentralScaleFactor

DatumEllipsoid

DatumFlattening

DatumMajorRadius

DatumMethod

DatumScaleFactor

DatumType

DeltaX

DeltaY

DeltaZ

FalseEasting

FalseNorthing

LatOf1stPt

LatOf2ndPt

LonOf1stPt

LonOf2ndPt

PMShift

ProjectionEllipsoid

ProjectionFlattening

ProjectionMajorRadius

ProjectionType

ScaleFactor

StateZone

UseAzimuthalForm

UTMZone

XRotation

YRotation

ZRotation

 

Methods

Delete

 

Example

This example creates a hatch map and copies the projection.

 

Sub main

'Creates an instance of the MapViewer Application

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

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes the application main window visible

 mvApp.Visible = True

 

'Assigns the location of the samples folder to

'the variable "InPath"

 InPath$ = mvApp.ApplicationFolder + " samples\"

 

'Creates a map document object, and assigns it

'to the variable named "Plot"

 Set Plot = mvApp.Documents.Add(DocType:=mvDocPlot)

 

'Creates a hatch map object and assigns it to the

'variable named "HatchMap"

 Set HatchMap = Plot.CreateHatchMap( BoundaryFileName:=InPath$ + _

 "co2010.gsb", DataFileName:=InPath$ + "co2010.dat", PIDCol:=1, _

 VarCol:=5, NumClasses:=4)

 

'Creates a copy of the map's projection and assigns

'it to the variable named "Proj"

 Set Proj = Plot.CopyDocProjection

End sub