AssignCoordinateColumns
AssignCoordinateColumns sets worksheet coordinate columns. It allows to specify the X, Y, and Z columns containing the coordinate data. Returns a Boolean. Returns 'True' if the process is successful, otherwise, returns 'False'.
Syntax
object.AssignCoordinateColumns( xCol, yCol, zCol )
Parameter |
Type |
Required/ Optional |
Default |
Description |
xCol |
Long |
Required |
|
This specifies the column containing the X axis data. X column is the Easting column. |
yCol |
Long |
Required |
|
This specifies the column containing the Y axis data. Y column is the Northing column. |
zCol |
Long |
Required |
|
This specifies the column containing the Z axis data. Z column is the Elevation column. |
Example
This example assigns the worksheet columns 1, 2 and 3 (A, B and C) as the X, Y and Z columns respectively.
'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 Wks as an object
Dim Wks As Object
'Opens the sample Demogrid.DAT file as a worksheet document
Set Wks = SurferApp.Documents.Open(FileName:=SurferApp.Path+"\Samples\Demogrid.DAT")
'Assigns the worksheet columns
Wks.AssignCoordinateColumns( xCol:=1 , yCol:=2, zCol:=3 )
Used by: WksDocument object