• No results found

Returns or sets the numeric code of the coordinates system.

Name Description Attributes

Code Returns or sets the numeric code of the coordinates system.

ConvertCoordsTo Converts the coordinates of a point expressed in the current system to another one.

Datum Returns or sets the numeric value of the datum.

DatumName Name of the datum.

Description Description of the datum.

Ellipsoid Returns or sets the numeric value of the ellipsoid.

EllipsoidName Name of the ellipsoid.

Name Returns or sets the name of the coordinates system.

Pick Opens the coordinates system dialogue.

ProjMethod Projection method used for the current coordinates system.

ProjParameter Reads a parameter of the projection.

SetDatum Changes the datum of the system.

SetProjection Sets the projection parameters of the coordinate system.

Unit Returns or sets the unit of the coordinate system.

Dim doc Dim coordSys

Set doc = Atoll.ActiveDocument

Set coordSys = doc.CoordSystemInternal

HRESULT Code(long *pVal); HRESULT Code(long val);

Atoll 3.3.2 Task Automation Guide

Chapter 8: CoordSystem Object © 2016 Forsk. All Rights Reserved.

Parameters

pVal: Address of the Long read as the code of the system. val: Long value representing the code of the system to set.

8.3 ConvertCoordsTo

Converts the coordinates of a point expressed in the current system to another one.

Parameters

[in] targetCS: An IDispCoordSystem interface pointer used to specify the coordinate system to which input coordinates must be converted.

[in] inPoint: A VARIANT used used to specify the coordinates of an input point. The coordinates are expressed in the current coordinate system. The VARIANT must be a one dimension array of 2 floating point values (VT_ARRAY | VT_R8). Element at index 0 is used to specify the x coordinate, element at index 1 is used to specify the y coordinate.

[out] outPoint: A pointer to a VARIANT used to return the coordinate of the inPoint input point expressed in the targetCS coor- dinate system. The type of the VARIANT returned is VT_ARRAT | VT_R8 : a one dimension array of 2 floating point values. Element at index 0 is used to specify the x coordinate, element at index 1 is used to specify the y coordinate.

Example

Classical system codes have values less than 32767. System codes greater or equal to 32768 correspond to user defined systems.

HRESULT ConvertCoordsTo( IDispCoordSystem *targetCS, VARIANT inPoint,

VARIANT *outPoint );

Public Sub ConvertSitesCoordinates Dim sites

Dim x Dim y Dim oFrom

Set oFrom = ActiveDocument.CoordSystemInternal Dim oTo

Set oTo = ActiveDocument.CoordSystemDisplay Dim coords

Set sites = ActiveDocument.GetRecords("Sites", True) Dim i

For i = 1 To sites.RowCount

x = sites.GetValue(i, "LONGITUDE") y = sites.GetValue(i, "LATITUDE")

8.4 Datum

Returns or sets the numeric value of the datum.

Parameters

pVal: Address read as the datum code of the system. val: Value to be set as the datum code of the system.

8.5 DatumName

Name of the datum.

Parameters

pVAl: Pointer to the datum name.

8.6 Description

Description of the datum.

Parameters

pVal: Pointer to datum description.

8.7 Ellipsoid

Returns or sets the numeric value of the ellipsoid.

Parameters

pVal: Address read as the ellipsoid code of the system. val: Value to be set as the ellipsoid code of the system.

8.8 EllipsoidName

LogMessage sites.GetValue(i,"NAME")&":"&CStr(coords(0))&";"&CStr(coords(1)) Next

End Sub

HRESULT Datum(long *pVal); HRESULT Datum(long val);

HRESULT DatumName(BSTR *pVal);

HRESULT Description(BSTR *pVal);

HRESULT Ellipsoid(long* pVal); HRESULT Ellipsoid(long Val);

Atoll 3.3.2 Task Automation Guide

Chapter 8: CoordSystem Object © 2016 Forsk. All Rights Reserved.

Parameters

pVal: Pointer to the name of the ellipsoid.

8.9 Name

Returns or sets the name of the coordinates system.

Parameters

pVal: Address read as the name of the coordinates system. val: Value to be set as the name of the coordinates system.

8.10 Pick

Opens the coordinates system dialogue.

Parameters

parentWindow: OLE_HANDLE of the parent window for which the dialogue is required to be opened.

types: Bitset of CoordSysType (see CoordSysTypes) corresponding to the types of systems the dialogue must filter before opening.

ret: Pointer to a VARIANT_BOOL, set to VARIANT_TRUE if the user quits the dialogue with OK, otherwise VARIANT_FALSE.

CoordSysTypes

8.11 ProjMethod

Projection method used for the current coordinates system.

Parameters

pVal: Pointer to the read ProjectionMethod. HRESULT EllipsoidName(BSTR* pVal);

HRESULT Name(BSTR *pVal); HRESULT Name(BSTR pVal);

HRESULT Pick(OLE_HANDLE parentWindow, WORD types, VARIANT_BOOL *ret);

enum CoordSysType

{ fgUndefinedCoordSys = 1, fgGeographic2D = 2, fgProjected2D = 4 } CoordSysType;

8.12 ProjParameter

Reads a parameter of the projection.

Parameters

index: Index of the parameter to read.

pVal: Address of the double containing the value of the parameter.

Remarks

Keep in mind that the real valid range of index parameters depends on the projection method.

8.13 SetDatum

Changes the datum of the system.

Parameters

ellipsoidCode: Numeric code of the ellipsoid of the new datum. params: Parameters of the projection provided as an array of variants.

8.14 SetProjection

Sets the projection parameters of the coordinate system.

Parameters

[in] method: The ProjectionMethod enumeration value used to change the projection method of the coordinate system. [in] projectionParameters: A SAFEARRAY of VARIANTs of type VT_R8 used to specify the projection parameters of the coordi- nate system. The projection parameters must match with the method parameter. Each parameter is identified by its index in the array, starting from 0. Array indexes are the same as ProjParameterIndices enumeration values. Projection parameters values are the the same as values returned by the ProjParameter property.

8.15 Unit

Returns or sets the unit of the coordinate system.

Parameters

pVAl: Address of the current geographic unit of the system. newVal: New value for the geographic unit.

HRESULT ProjParameter(ProjParameterIndices index, double *pVal);

HRESULT SetDatum(long ellipsoidCode, VARIANT params);

HRESULT SetProjection(ProjectionMethod method, VARIANT projectionParameters);

HRESULT Unit(GeographicUnit *pVal); HRESULT Unit(GeographicUnit newVal);

Atoll 3.3.2 Task Automation Guide

Chapter 9

ChildFolder

Object

Atoll 3.3.2 Task Automation Guide

9 ChildFolder Object

A ChildFolder object represents an item in the application explorer window. It can be a collection of sub-items. •

The ChildFolder object provides the following properties and methods:

Name Description Attributes

get_Application Returns the Application object. Type: Application object

Access: Read

get_Parent Returns the parent ChildFolder object. Type: ChildFolder object

Access: Read

get_Name Returns the ChildFolder object display name. Type: String

Access: Read/Write

put_Name Sets the ChildFolder object display name. Type: String

Access: Read/Write

get_Count Returns the number of children of the ChildFolder object. Type: Integer

Access: Read

get_Item Returns one of the children of the ChildFolder object.

Type: ChildFolder children collection Access: Read get__NewEnum Returns an object used to enumerate the children of the

ChildFolder object.

get_Visible Returns the visibility state of the ChildFolder object. Type: Boolean

Access: Read/Write

put_Visible Sets the visibility state of the ChildFolder object. Type: Boolean

Access: Read/Write

get_Selected Returns the selected state of the ChildFolder object. Type: Boolean

Access: Read/Write

put_Selected Sets the selected state of the ChildFolder object. Type: Boolean

Access: Read/Write Export Exports a ChildFolder object to a file, in a given format.

CentreOnMap Centres the application map window around the

ChildFolder object.

Redraw Redraws the ChildFolder object.

AddChild Adds a new child to the current ChildFolder object.

Remove Removes the ChildFolder object from its parent ChildFolder

object.

get_position Returns the ChildFolder object position relative to its parent ChildFolder object.

Type: Integer Access: Read/Write put_position Sets the ChildFolder object position relative to its parent

ChildFolder object.

Type: Integer Access: Read/Write get_Object Access to some specific features on the ChildFolder object.

get_dispatch Access to some specific features on the ChildFolder object.

get_ObjectKind Returns a type identifier of the ChildFolder object. Type: String

Access: Read

Atoll 3.3.2 Task Automation Guide

Chapter 9: ChildFolder Object © 2016 Forsk. All Rights Reserved.

In document Atoll 3.3.2 Task Automation Guide (Page 105-114)