ISGWorld80

ISGWorld80 in the main entry point to most TerraExplorer interfaces. Through this interface you can manage your application and 3D content and handle events.

See the "Overview" chapter for an introduction to TerraExplorer API, including the main issues addressed by the API and examples of the client applications that can be developed using the API.

 

 

Properties

 

Analysis

Provides a set of methods for analyzing the terrain.

Application

Controls various application level settings.

Command

Gives access to standard TerraExplorer menu commands.

CoordServices

Provides a set of methods for reprojecting given coordinates between different coordinate systems.

Creator

Composed of many methods that create different objects.

DateTime

Provides you with date and time related features.

Drawing

Provides methods for interactive user drawing capabilities.

IgnoreAccelerators

Gets and sets a Boolean that determines whether the containing application executes all keyboard acceleration commands or TerraExplorer executes them.

Navigate

Gives you control of the camera in terms of positioning, orientation, and speed.

Project

Gives access to project settings and to basic methods for opening and saving the project.

ProjectTree

Allows you to manipulate the Project Tree items, including management of groups, items and layers.

SGServer

Provides the methods for connecting, disconnecting and checking the currently connected SkylineGlobe Server.

Terrain

An ITerrain80 representing information about the terrain, such as the MPT file name that is being used, and information about the MPT coordinate system.

Version

Gets information about the version of TerraExplorer that is running.

Window

A wrapper for all the functionality that represents interaction with the 3D Window, such as snapshots, dimensions and query pixel information.

 

Methods

 

AttachEvent

Binds the specified function to an event, so that the function gets called whenever the event occurs.

CreateInstance

Creates an SGWorld instance.

DetachEvent

Unbinds a function that was bound to an event using the AttachEvent method.

GetOptionParam

Returns the value of a specified parameter in the TerraExplorer options.

GetParam

Reserved. Currently not used.

Open

Opens a specified project.

SetOptionParam

Sets the value of a specified parameter in the TerraExplorer options.

SetParam

Reserved. Currently not used.

SetParamEx

Reserved. Currently not used.

 

Events

 

OnAnalysisDistancePointAdded

This event occurs when a distance analysis point is added.

OnAnalysisProgress

Notifies the client of the analysis progress.

OnCommandExecuted

 

This event occurs when a TerraExplorer ribbon command is executed, and can be used to discover the ICommand.Execute API for each ribbon command.

OnCommandValueChanged

This event occurs when a standard TerraExplorer ribbon command’s value is changed.

OnContainerChanged

This event occurs when an operation is performed on a project’s custom containers.

OnCreateBasicKit

Reserved. No longer used

OnDataSourceFeatureIdChanged

This event is triggered when the ID of the feature that was assigned by the data source is changed.

OnDateTimeChanged

This event occurs when the date and time settings are changed to a specific date and time.

OnDrawHUD

This event is sent in each frame, after the frame is rendered, but before the HUD layer is drawn.

OnDrawingAbort

This event occurs when a drawing action is aborted.

OnDrawingFinished

This event occurs when a drawing action is finished.

OnDrawingGeometryChanged

This event occurs when a drawing object’s geometry is changed.

OnEndDrawMeasurement

This event occurs when a measurement is finished (all measurement points were added).

OnFeatureLayerChanged

This event occurs when a feature layer was changed.

OnFeatureLayerSaved

This event occurs when a feature layer was saved.

OnFileClosed

This event occurs when a Fly file is closed.

OnFileClosing

This event occurs when a file is being closed.

OnFileSave

This event occurs when a Fly file is being saved.

OnFrame

This event occurs, before the frame is rendered, to allow the client to perform any per frame activities (i.e. moving objects on the terrain).

OnImportFeatureLayerProgress

This event indicates to the client the current status of the import process.

OnInputModeChanged

This event occurs when the TerraExplorer Input mode is changed (e.g., switching from free flight mode to measurements mode).

OnKeyboard

This event occurs when a key on the keyboard is pressed or released.

OnLayerStreaming

This event occurs when a layer is streamed from the server without first storing it in a client local file.

OnLButtonClicked

This event occurs when the user clicks the left mouse button.

OnLButtonDblClk

This event occurs when the user double-clicks the left mouse button.

OnLButtonDown

This event occurs when the user presses the left mouse button.

OnLButtonUp

This event occurs when the user releases the left mouse button.

OnLoadFinished

This event occurs when TerraExplorer finishes loading a Fly file.

OnMButtonDblClk

This event occurs when the user presses the middle mouse button.

OnMButtonDown

This event occurs when the user presses the middle mouse button.

OnMButtonUp

This event occurs when the user releases the middle mouse button.

OnMeasurementAreaResult

This event occurs when the results are returned for an area measurement.

OnMeasurementDistanceResult

This event occurs when the results are returned for a distance measurement.

OnMeasurementQueryResult

This event occurs when the results are returned for an information query.

OnMouseWheel

This event occurs as a user rotates the mouse wheel and encounters the wheel’s next notch.

OnNetworkLinkLoadFailed

This event occurs when loading of a KML network link fails.

OnObjectAction

This event occurs when certain actions (e.g., fly to an object) are performed on the object.

OnObjectSelected

This event occurs when an object is selected in the 3D Window.

OnObjectUnderCursorChanged

This event occurs when the object under the cursor is changed.

OnObjectUnselected

This event occurs when an object is unselected in the 3D Window.

OnPresentationEvent

This event occurs when any change occurs in the running of a presentation, e.g., presentation started, action started, or action finished.

OnPresentationStatusChanged

This event occurs when a presentation’s play status changes status.

OnProjectTreeAction

This event occurs when certain actions (e.g., showing and hiding items) are performed on Project Tree items.

OnPublishAborted

 

This event occurs when the publishing of a project is aborted.

OnPublishFinished

 

This event occurs when the publishing of a project is finished.

OnPublishProgress

 

This event provides the client information regarding the publishing process.

OnRButtonDblClk

This event occurs when the user double-clicks the right mouse button.

OnRButtonDown

This event occurs when the user presses the right mouse button.

OnRButtonUp

This event occurs when the user releases the right mouse button.

OnRenderQualityChanged

This event occurs whenever the terrain quality that the user is currently viewing is updated.

OnSGWorld

This event occurs when a specifiedTerraExplorer event takes place.

OnSGWorldMessage

This event occurs when a message object is about to be triggered.

IgnoreAccelerators

Gets and sets a Boolean that determines whether the containing application executes all keyboard acceleration commands or TerraExplorer executes them. If this Boolean is set to TRUE, the containing application executes all keyboard acceleration commands. If it is set to FALSE, TerraExplorer executes them.

JavaScript

 

IgnoreAccelerators

 

C#

 

bool IgnoreAccelerators { get; set; }

 

C++

 

HRESULT IgnoreAccelerators([out, retval] VARIANT_BOOL* pVal)

HRESULT IgnoreAccelerators([in] VARIANT_BOOL pVal)

AttachEvent

Binds the specified function to an event, so that the function gets called whenever the event occurs.

 

JavaScript

 

AttachEvent(

       bstrEventName,

       dispFunc)

 

C#

 

void AttachEvent(

       string bstrEventName,

       object dispFunc)

 

C++

 

HRESULT AttachEvent(

       BSTR bstrEventName,

       VARIANT dispFunc)

Parameters

bstrEventName

A string representing the event name.

dispFunc

The function that should be called when the event occurs or a delegate to the function in C#.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT. 

CreateInstance

This method is used to create an SGWorld80 instance from either the latest or a specific version. This is used primarily when working with scripting languages to incorporate TerraExplorer COM capabilities into a webpage. See "Working with Scripting Languages" for more information.

 

JavaScript

 

CreateInstance(

       clsid)

 

C#

 

dynamic CreateInstance(

       string clsid)

 

C++

 

HRESULT CreateInstance(

       BSTR clsid,

       IUnknown** ppUnk)

Parameters

clsid

CLSID of the desired object (e.g. “{3A4F91A0-65A8-11D5-85C1-0001023952C1}”).

Return Value

ppUnk

A pointer to the newly created object after the call returns successfully.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

DetachEvent

Functions that were bound to an event using the AttachEvent method must be unbound from the event, to stop receiving notifications when the event occurs.

 

JavaScript

 

DetachEvent(

       bstrEventName,

       dispFunc)

 

C#

 

void DetachEvent(

       string bstrEventName,

       object dispFunc)

 

C++

 

HRESULT DetachEvent(

       BSTR bstrEventName,

       VARIANT dispFunc)

 

Parameters

bstrEventName

A string representing the event name.

dispFunc

The function that was attached to the event.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

GetOptionParam

Returns the value of a specified parameter in the TerraExplorer options. Each parameter is accessed by a unique identification string. SeeSetOptionParam” for a list of the supported parameter string values and the respective parameter value options.

 

JavaScript

 

GetOptionParam(

       paramName)

 

C#

 

dynamic GetOptionParam(

       string paramName)

 

C++

 

HRESULT GetOptionParam(

        BSTR paramName,

        VARIANT pVal)

Parameters

paramName

The name of the parameter whose value is being returned.

Return Value

pVal

The parameter value.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

Open

Opens a specified project.

 

JavaScript

 

Open(

       ProjectURL)

 

C#

 

void Open(

       string ProjectURL)

 

C++

 

HRESULT Open(

       BSTR ProjectURL)

 

Parameters

ProjectURL

A full path name or a URL to the project file.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

SetOptionParam

Allows defining the value of a specified parameter in the TerraExplorer options. Each parameter is accessed by a unique identification string. Changes are applied to the currently open FLY project, but are not saved when the project or TerraExplorer is closed. These changes reflect in the 3D Window, but not in the TerraExplorer’s options dialog box.

The following table describes the supported parameter string values and the respective parameter value options:

 

paramName

Type

paramVal/pVal

General

“TerrainCacheSize”

[in, out] int

The size of the terrain cache.

“ModelsCacheSize”

[in, out] int

The size of the models’ cache.

“DefaultTerrainDatabase”

[in, out] BSTR

The default terrain database to use when directly opening a KML or KMZ file. Only Fly, KML, KMZ, MPT, and TBP files can be used.

“SGServicesURL”

[out] BSTR

The URL of the SkylineGlobe Server JSON file configuring the search provider and available OSM layers.

The default path is: http://www.skylinesoft.com/SG/SGServices.json

“PyramidImageFormat”

[in, out] int

Select the image pyramid format. Use any of the following values:

§   -1 = None

§   1 = MPT JPEG v3

§   4 = MPT PNG 24

§   6 = Uncompressed

“PyramidElevationFormat”

[in, out] int

Select the elevation pyramid format. Use any of the following values:

§   -1 = None

§   101 = MPT JPEG v3

§   6 = Uncompressed MPU

§   105 = MPT PNG 16.8

“SuggestPyramidCreation”

[in, out] int

Determines whether an Open Create Resolution Pyramid dialog box is displayed when loading raster layers with insufficient resolution pyramids. Use either of the following values:

§   0 = Disabled

§   1 = Enabled

“UseReprojectByGDALStartingFromVersion3”

[in, out] int

Determines whether GDAL v3’s coordinate system reprojection library is used. This setting will only take effect after closing and reopening TerraExplorer. Use either of the following values:

§   0 = Disabled

§   1 = Enabled

Graphics

"UseTerrainFadeIfAvailable"

[in, out] bool

A Boolean that determines whether terrain fade is activated.

"TerrainAnd3DMLQuality"

[in, out] BSTR

Select the resolution of the polygonal terrain model. Use any of the following values:

§   0 = "Normal"

§   1 = "High"

§   2 = "Best - FHD"

§   3 = "Best – 4K"

Post Effects

"Saturation"

[in, out] int

Enter a value from -100 to 100.

"Brightness"

[in, out] int

Enter a value from -100 to 100.

"Contrast"

[in, out] int

Enter a value from -100 to 100.

"Gamma"

[in, out] long

Enter a value from 0 to 10.

“AmbientOcclusion”

[in, out] int

Use either of the following values:

§   0 = Disabled

§   1 = Enabled

"Depth Perception"

[in, out] int

Use either of the following values:

§   0 = Disabled

§   1 = Enabled

"ResetPostEffects"

[in, out] int

Reserved. Always pass 0 (zero).

Shadows

"GlobalShadowColor"

[in, out] long

The color of the global shadow in hexadecimal form: 0xaabbggrr.

"OptimizeShadowAndViewshed"

[in, out] bool

A Boolean that determines whether shadow and viewshed display should be optimized.

Navigation

"ZoomMode"

[in, out] int

Select the zoom mode:

§   0 = Zoom to center

§   1 = Zoom to cursor location

"TiltAffectsAltitude"

[in, out] bool

A Boolean that determines whether the plane tilt affects the altitude.

View

"Speed"

[in, out] int

Select the speed display units. Use any of the following values:

§   0 = Km/h

§   1 = Mph

§   2 = Knots

"AltitudeAndDistance"

[in, out] int

Select the altitude and distance display units. Use either of the following values:

§   0 = Meters

§   1 = Feet

“MeasurementsUnit”

[in, out] int

Select the display units for distance. The selection for this parameter should be consistent with the units type selected in AltitudeAndDistance. If you want TerraExplorer to automatically display the most appropriate metric or imperial (feet) units for each measurement based on size, set the value to 0 = Meter_Auto:

§   0 = Meter_Auto

§   1 = Millimeter

§   2 = Centimeter

§   3 = Meter

§   4 = Kilometer

§   5 = Feet_Auto

§   6 = Inch

§   7 = Feet

§   8 = Yard

§   9 = Mile

§   10 = Nautical_Mile

“MeasurementDecimalPlaces”

[in, out] int

Select the number of decimal places to display in distance measurements (0-6).

“MeasurementFontSize”

[in, out] int

Select the font size for display of measurement information in the 3D Window (8-72).

ShowMeasuresOnObject”

[in, out] int

Show segment lengths while editing. Use either of the following values:

§   0 = Disabled

§   1 = Enabled

"AltitudeType"

[in, out] int

Select the Altitude Type display units. Use either of the following values:

§   0 = Above Ground Level (AGL)

§   1 = Absolute Values

“AltitudeDecimalPlaces”

[in, out] int

Select the number of decimal places to display in altitude measurements (0-6).

"LatLongCoordinates"

[in, out] int

Select the Lat-Long Coordinates display units. Use any of the following values:

§   0 = Decimal Degrees

§   1 = Degrees, Minutes, Seconds

§   2= Degrees, Decimal Minutes

Screen Overlay

“UseSimplifiedNavigationControl”

[in, out] int

Select the type of navigation controls to display:

0 = Navigation Control with Level Indicator

1 = Simplified Navigation Control

"HeadUpDisplay"

 

[in, out] int

Determines the Head Up Display. Use any combination of the following flags:

§   HUD_LAYER_NONE = 0

§   HUD_LAYER_ACTIVE_ARROWS = 1

§   HUD_LAYER_CENTER_SIGN = 2

§   HUD_LAYER_TEXT_DATA = 4

§   HUD_LAYER_COMPASS = 8

§   HUD_LAYER_GRAPHIC_1 = 16 (reserved)

§   HUD_LAYER_PAN_BARS = 32

§   HUD_LAYER_DATE_TIME      = 64

§   HUD_LAYER_SCALE_BAR      = 128

§   HUD_LAYER_ZOOM_CONTROL          = 256

"HudColor"

[in, out] long

The color of the HUD in the hexadecimal form: 0x00bbggrr.

Snapping Options

Determines how a node or object snaps to other objects.

"NodeSnapping"

[in, out] int

Snap object or node to nodes of other objects or features. Use either of the following values:

§   0 = Disabled

§   1 = Enabled

"LineSegmentSnapping"

[in, out] int

Snap object or node to line segments of other objects or features. Use either of the following values:

§   0 = Disabled

§   1 = Enabled

"3DSnapping"

[in, out] int

Smart snap object or node to dynamically-identified edges and corners of any element in the 3D World. Use either of the following values:

§   0 = Disabled

§   1 = Enabled

"DirectionalSnapping"

[in, out] int

Constrain the object line segments currently being drawn to pre-defined angle increments.  Use either of the following values:

§   0 = Disabled

§   1 = Enabled

"DirectionalSnappingDegrees"

[in, out] double

The angle increments by which to constrain object line segments currently being drawn, if DirectionalSnapping is set to Enabled (0-180).

"ShowMeasuresOnObject"

[in, out] int

Show segment lengths while editing a polygon/polyline. Use either of the following values:

§   0 = Disabled

§   1 = Enabled

"CreateMeasurementObjects"

[in, out] bool

A Boolean that determines whether to create measurement objects that will be accessible from the Measurement Objects folder in the Project Tree.

Note:    In TerraExplorer GUI, this option is available from the Distance and Area measurement dialogs.

 

Note:    Only some of the TerraExplorer Options parameters are exposed through this property. For other options, use the Settings dialog box. SeeUsing TerraExplorer Options” chapter in the User Manual for additional information.

 

JavaScript

 

SetOptionParam(

       paramName,

       paramVal,

       bSave)

 

C#

 

void SetOptionParam(

       string paramName,

       object paramVal,

       bool bSave=False)

 

C++

 

HRESULT SetOptionParam(

        BSTR paramName,

        VARIANT paramVal,
        VARIANT_BOOL bSave);)

 

Parameters

paramName

The name of the parameter whose value is being set.

paramVal

The parameter value that should be set.

bSave

A Boolean that determines whether to save the current options for use in future TerraExplorer sessions.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

OnAnalysisDistancePointAdded

This event occurs when a distance analysis point is added. This event only relates to measurements performed using the Aerial Distance tool (from the UI or ICommand80.Execute).

 

JavaScript

 

OnAnalysisDistancePointAdded(

       pRuler,

       AerialDist

       HorizontalDist

       Slope

       ElevationDifference)

 

C#

 

void OnAnalysisDistancePointAdded (

       IGeometry pRuler,

       double AerialDist,

       double HorizontalDist,

       double Slope,

       double ElevationDifference)

 

C++

 

HRESULT OnAnalysisDistancePointAdded (

       [in] IGeometry pRuler,

       [in] double AerialDist,

       [in] double HorizontalDist,

       [in] double Slope,

       [in] double ElevationDifference)

Parameters

pRuler

An IGeometry representing the geometric properties of the defined path.

AerialDist

Aerial distance between the points.

HorizontalDist

Horizontal distance between the points.

Slope

Slope of the line between the first and last points.

ElevationDifference

Difference in elevation between the first and last points.

OnAnalysisProgress

This event indicates to the client the current status of the terrain analysis calculations.

Note:    In the current version, only the MeasureTerrainArea and MeasureTerrainPerimeter analyses report progress.

 

JavaScript

 

OnAnalysisProgress(

       CurrPos,

       Range)

 

C#

 

bool OnAnalysisProgress(

       int CurrPos,

       int Range)

 

C++

 

HRESULT OnAnalysisProgress(

       [in] long CurrPos,

       [in] long Range,

       [out, retval] VARIANT_BOOL* pbCancelled)

Parameters

CurrPos

The portion of the analysis calculations that was already performed.

Range

The entire analysis process.

Return Value

pbCancelled

A Boolean that indicates whether to cancel the analysis process. Returning TRUE cancels the process, while FALSE lets it continue.

OnCommandExecuted

This event occurs when a TerraExplorer ribbon command is executed, and can be used to discover the ICommand.Execute API for each ribbon command.

JavaScript

 

OnCommandExecuted(

       CommandID,

       parameters)

 

C#

 

bool OnCommandExecuted(

       int CommandID,

       object parameters)

 

C++

 

HRESULT OnCommandExecuted(

       [in] long CommandID,

       [in] VARIANT parameters

       [out, retval] VARIANT_BOOL* pbHandled);)

Parameters

CommandID

The ID of the menu command being executed. See the list of menu commands organized according to TerraExplorer Ribbon tabs.

parameters

The command’s parameters. See the command parameters in the list of menu commands.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the command and does not wish TerraExplorer to respond to the command execution.

OnCommandValueChanged

This event occurs when a TerraExplorer menu command’s value has changed.

 

JavaScript

 

OnCommandValueChanged(

       CommandID,

       newVal)

 

C#

 

void OnCommandValueChanged(

       int CommandID,

       object newVal)

 

C++

 

HRESULT OnCommandValueChanged(

       [in] long CommandID,

       [in] VARIANT newVal)

Parameters

CommandID

The ID of the menu command whose value is being checked.

newVal

The command’s new value.

OnContainerChanged

This event occurs when an operation is performed on a project’s custom containers (e.g. a container is added or removed).

 

JavaScript

 

OnContainerChanged(

       Operation,

       ContainerItem)

 

C#

 

void OnContainerChanged(

       ContainerOperation Operation,

       IContainerItem80 ContainerItem)

 

C++

 

HRESULT OnContainerChanged(

       [in] ContainerOperation Operation,

       [in] IContainerItem80* ContainerItem)

Parameters

Operation

The specific operation for which the event should be called. The following are the possible values:

·          CO_ADDED = 0

·          CO_REMOVED = 1

·          CO_MODIFIED = 2

ContainerItem

An IContainerItem80 representing the container whose status is being checked.

OnDataSourceFeatureIdChanged

This event is triggered when the ID of the feature that was assigned by the data source is changed (See: DataSourceFeatureID for more information). This sometimes happens when saving a new feature created in TerraExplorer as a shapefile.

 

JavaScript

 

OnDataSourceFeatureIdChanged(

       ObjectID,

       oldFeatureId,

       newFeatureId)

 

C#

 

void OnDataSourceFeatureIdChanged (

       string ObjectID,

       string oldFeatureId,

       string newFeatureId)

 

C++

 

HRESULT OnDataSourceFeatureIdChanged (

       [in] BSTR ObjectID,

       [in] BSTR oldFeatureId,

       [in] BSTR newFeatureId)

 

Parameters

ObjectID

The ID of the feature object (generally a new feature created in TerraExplorer).

oldFeatureId

The old ID of the feature.

newFeatureId

The new ID of the feature.

OnDateTimeChanged

This event occurs when either the current date and time or the range on the Date and Time slider is changed. To check the range, use IDateTime80.CurrentTimeBuffer.

 

JavaScript

 

OnDateTimeChanged(

       DateTime)

 

C#

 

void OnDateTimeChanged(

       object DateTime)

 

C++

 

HRESULT OnDateTimeChanged(

       [in] VARIANT DateTime)

Parameters

DateTime

The new date and time that was set. TerraExplorer sends this information as VT_Date. This parameter is interpreted differently based on the client: 

·          JavaScript client – interprets it as a JavaScript Date object

·          C# client – interprets it as a DateTime object

OnDrawHUD

This event is sent in each frame, after the frame is rendered, but before the HUD layer is drawn. This event can be used to update the HUD layer using the IWindow80.GetControls method.

 

JavaScript

 

OnDrawHUD()

 

C#

 

void OnDrawHUD()

 

C++

 

HRESULT OnDrawHUD()

 

OnDrawingAbort

This event occurs when a drawing action (performed by calling any of the IDrawing methods or DrawFeature) is aborted.

 

JavaScript

 

OnDrawingAbort()

 

C#

 

void OnDrawingAbort ()

 

C++

 

HRESULT OnDrawingAbort ()

OnDrawingFinished

This event occurs when a drawing action (performed by calling any of the IDrawing methods or DrawFeature) is finished.

 

JavaScript

 

OnDrawingFinished(

       pGeometry)

 

C#

 

void OnDrawingFinished (

       IGeometry pGeometry)

 

C++

 

HRESULT OnDrawingFinished (

       [in] IGeometry* pGeometry)

Parameters

pIGeometry

An IGeometry derived object, representing the geometric properties of the drawn object.

OnDrawingGeometryChanged

This event occurs when a drawing object’s geometry (created by calling any of the IDrawing methods or DrawFeature) is changed, e.g., by adding a polyline point or label.

 

JavaScript

 

OnDrawingGeometryChanged(

       pGeometry

       bIntersect)

 

C#

 

void OnDrawingGeometryChanged (

       IGeometry pGeometry

       bool bintersect)

 

C++

 

HRESULT OnDrawingGeometryChanged (

       [in] IGeometry* pGeometry

       [in] BOOL bIntersect)

Parameters

pIGeometry

An IGeometry derived object, representing the geometric properties of the drawn object.

bIntersect

A Boolean that indicates whether the drawn geometry intersects itself.

OnEndDrawMeasurement

This event occurs when the measurement is finished (all measurement points were added).

 

JavaScript

 

OnEndDrawMeasurement(

       pMeasurement)

 

C#

 

void OnEndDrawMeasurement (

       IGeometry pMeasurement)

 

C++

 

HRESULT OnEndDrawMeasurement (

       [in] IGeometry* pMeasurement)

Parameters

pMeasurement

An IGeometry representing the linestring or polygon geometry that designates the measured distance or area.

OnFeatureLayerChanged

This event occurs when a feature layer was changed.

 

JavaScript

 

OnFeatureLayerChanged (

       ObjectID)

 

C#

 

void OnFeatureLayerChanged (

       string ObjectID)

 

C++

 

HRESULT OnFeatureLayerChanged (

       [in] BSTR ObjectID)

Parameters

ObjectID

The ID of the layer that was changed.

OnFeatureLayerSaved

This event occurs when a feature layer was saved.

 

JavaScript

 

OnFeatureLayerSaved (

       ObjectID)

 

C#

 

void OnFeatureLayerSaved (

       string ObjectID)

 

C++

 

HRESULT OnFeatureLayerSaved (

       [in] BSTR ObjectID)

Parameters

ObjectID

The ID of the layer that was saved.

OnFileClosed

This event occurs when a Fly file is closed.

 

JavaScript

 

OnFileClosed()

 

C#

 

void OnFileClosed()

 

C++

 

HRESULT OnFileClosed()

OnFileClosing

This event occurs before a Fly file is closed to notify the client that the file is being closed.

 

JavaScript

 

OnFileClosing()

 

C#

 

void OnFileClosing()

 

C++

 

HRESULT OnFileClosing()

OnFileSave

This event occurs just before a Fly file is saved. The client can use this event, for example, to update a database with information within TerraExplorer before the user saves it.

 

JavaScript

 

OnFileSave()

 

C#

 

void OnFileSave()

 

C++

 

HRESULT OnFileSave()

OnFrame

This event is sent in each frame, before the frame is rendered, to allow the client to perform any per frame activities (i.e. moving objects on the terrain).

 

JavaScript

 

OnFrame()

 

C#

 

void OnFrame()

 

C++

 

HRESULT OnFrame()

OnImportFeatureLayerProgress

This event provides the client information regarding the import process, of either an entire layer imported (by calling IFeatureLayer.Load) or of the features returned and rendered by a call toIFeatureLayer.ExecuteSpatialQuery or IFeatureLayer. ExecuteQuery.

 

JavaScript

 

OnImportFeatureLayerProgress(

       CurrPos

       Range)

 

C#

 

bool OnImportFeatureLayerProgress (

       long CurrPos,

       long Range)

 

C++

 

HRESULT OnImportFeatureLayerProgress (

       [in] long CurrPos,

       [in] long Range,

       [out, retval] VARIANT_BOOL* pbCancelled))

Parameters

CurrPos

The portion of the entire import (represented by the Range parameter) that was already performed.

Range

The entire import process.

Return Value

pbCancelled

A Boolean that indicates whether to cancel the import process. Returning TRUE cancels the process, while FALSE lets it continue.

OnInputModeChanged

This event occurs when the TerraExplorer input mode is changed (e.g., switching from free flight mode to measurements input mode).

 

JavaScript

 

OnInputModeChanged(

       NewMode)

 

C#

 

void OnInputModeChanged(

       MouseInputMode NewMode)

 

C++

 

HRESULT OnInputModeChanged(

       [in] MouseInputMode NewMode)

Parameters

NewMode

Determines the new input mode selected. This parameter can be one of the following values:

·          MI_FREE_FLIGHT = 0
Free flight in the 3D Window.

·          MI_COM_CLIENT = 1
Customized input mode selected by a COM user.

·          MI_CONTROLLED_FLIGHT = 2
The camera is controlled by an operation (e.g., Fly to, Circle Pattern).

·          MI_EDIT = 3
TerraExplorer is in editing input mode.

·          MI_MEASUREMENT = 4
TerraExplorer is in measurements input mode.

OnKeyboard

This event occurs when a key on the keyboard is pressed or released.

 

JavaScript

 

OnKeyboard(

       Message,

       Char,

       KeyState)

 

C#

 

bool OnKeyboard (

       int Message,

       int Char

       int KeyState)

 

C++

 

HRESULT OnKeyboard (

       [in] long Message,

       [in] long Char,

       [in] long KeyState,

       [out, retval] VARIANT_BOOL pbHandled)

Parameters

Message

The state of the key that is pressed:

·          WM_KEYDOWN = 256

·          WM_KEYUP =257

Char

The virtual key code of the given key. For a list of standard virtual key codes, see https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes.  

 

KeyState

Indicates whether various keys are down. This parameter can be any combination of the following values:

·          LEFT_CONTROL  = 2

·          RIGHT_CONTROL = 4

·          LEFT_SHIFT = 8

·          RIGHT_SHIFT = 16

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the keyboard action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the keyboard action.

OnLayerStreaming

This event occurs when a layer changes status between streaming and not streaming.

 

JavaScript

 

OnLayerStreaming(

       LayerGroupID,

       bStreaming)

 

C#

 

void OnLayerStreaming(

       string LayerGroupID,

       bool bStreaming)

 

C++

 

HRESULT OnLayerStreaming(

       [in] BSTR LayerGroupID,

       [in] VARIANT_BOOL bStreaming)

Parameters

LayerGroupID

The ID of the layer that is being streamed.

bStreaming

A Boolean that that indicates whether or not the layer is being streamed. The value is TRUE when the layer is being streamed.

OnLButtonClicked

This event occurs when the left mouse button is clicked, i.e. quickly pressed and released.

 

JavaScript

 

OnLButtonClicked(

       Flags,

       X,

       Y)

 

C#

 

bool OnLButtonClicked (

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnLButtonClicked (

       [in] long Flags,   

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnLButtonDblClk

This event occurs when the user double-clicks the left mouse button.

 

JavaScript

 

OnLButtonDblClk(

       Flags,

       X,

       Y)

 

C#

 

bool OnLButtonDblClk(

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnLButtonDblClk(

       [in] long Flags,   

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnLButtonDown

This event occurs when the user presses the left mouse button.

 

JavaScript

 

OnLButtonDown(

       Flags,

       X,

       Y)

 

C#

 

bool OnLButtonDown(

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnLButtonDown(

       [in] long Flags,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnLButtonUp

This event occurs when the user releases the left mouse button.

 

JavaScript

 

OnLButtonUp(

       Flags,

       X,

       Y)

 

C#

 

bool OnLButtonUp(

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnLButtonUp(

       [in] long Flags,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

Once the method call is returned, pbHandled contains the Boolean return value that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnLoadFinished

This event occurs when TerraExplorer finishes loading a Fly file.

 

JavaScript

 

OnLoadFinished(

       bSuccess)

 

C#

 

void OnLoadFinished(

       bool bSuccess)

 

C++

 

HRESULT OnLoadFinished(

       [in] VARIANT_BOOL bSuccess)

Parameters

bSuccess

A Boolean that indicates whether or not TerraExplorer finished loading the Fly file successfully.

OnMButtonDblClk

This event occurs when the user presses the middle mouse button.

 

JavaScript

 

OnMButtonDblClk(

       Flags,

       X,

       Y)

 

C#

 

bool OnMButtonDblClk(

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnMButtonDblClk(

       [in] long Flags,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnMButtonDown

This event occurs when the user presses the middle mouse button.

 

JavaScript

 

OnMButtonDown(

       Flags,

       X,

       Y)

 

C#

 

bool OnMButtonDown(

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnMButtonDown(

       [in] long Flags,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON  = 1

·          MK_ RBUTTON  = 2

·          MK_ SHIFT          = 4

·          MK_CONTROL   = 8

·          MK_ MBUTTON =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnMButtonUp

This event occurs when the user releases the middle mouse button.

 

JavaScript

 

OnMButtonUp(

       Flags,

       X,

       Y)

 

C#

 

bool OnMButtonUp(

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnMButtonUp(

       [in] long Flags,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnMeasurementAreaResult

This event occurs when the results are returned for an area measurement.

 

JavaScript

 

OnMeasurementAreaResult(

       MeasurementAreaResult)

 

C#

 

bool OnMeasurementAreaResult (

       string measurementAreaResult)

 

C++

 

HRESULT OnMeasurementAreaResult (

       [in] BSTR measurementAreaResult,

       [out, retval] VARIANT_BOOL* pbHandled))

Parameters

measurementAreaResult

The area measurement result.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the area measurement result itself and does not wish TerraExplorer to respond. When the value is FALSE, TerraExplorer handles the mouse action.

OnMeasurementDistanceResult

This event occurs when the results are returned for a distance measurement.

 

JavaScript

 

OnMeasurementDistanceResult(

       measurementDistanceResult)

 

C#

 

bool OnMeasurementDistanceResult (

       string measurementDistanceResult)

 

C++

 

HRESULT OnMeasurementDistanceResult (

       [in] BSTR measurementDistanceResult,

       [out, retval] VARIANT_BOOL* pbHandled))

Parameters

measurementDistanceResult

The distance measurement result.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the measurement distance result itself and does not wish TerraExplorer to respond. When the value is FALSE, TerraExplorer handles the mouse action.

OnMeasurementQueryResult

This event occurs when the results are returned for an information query about any point or object in the 3D World.

 

JavaScript

 

OnMeasurementQueryResult(

       queryResult,

       ObjectID)

 

C#

 

bool OnMeasurementQueryResult (

       string queryResult,

       string ObjectID)

 

C++

 

HRESULT OnMeasurementQueryResult (

       [in] BSTR queryResult,

       [in] BSTR ObjectID,

       [out, retval] VARIANT_BOOL* pbHandled))

Parameters

queryResult

An XML containing the information query result. E.g.,

<?xml version='1.0' encoding='ISO-8859-1'?><Root><General><p var="Longitude">-109.461035</p><p var="Latitude">40.694764</p><p var="MGRS">12TXL3002606012</p><p var="Altitude">2721.85 Meters </p></General></Root>

Example XML for an Object Query

<?xml version='1.0' encoding='ISO-8859-1'?><Root><General><p var="Description">New Polygon ##20008342</p><p var="Type">Polygon</p><p var="Pivot Longitude">-102.242197</p><p var="Pivot Latitude">40.892605</p><p var="Pivot MGRS">13TGF3232430497</p><p var="Pivot Altitude">1146.66 Meters  (0.00 Meters AGL)</p>

<p var="Perimeter">908.98 Km</p>

<p var="Area" tooltip="Area of the horizontal projection">51339.77 Square km</p></General></Root>

ObjectID

The ID of the object that was queried. If no object was queried, an empty string is returned.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the information query result itself and does not wish TerraExplorer to respond. When the value is FALSE, TerraExplorer handles the mouse action.

OnMouseWheel

This event occurs when a user rotates the mouse wheel and encounters the wheel’s next notch.

 

JavaScript

 

OnMouseWheel(

       Flags,

       zDelta,

       X,

       Y)

 

C#

 

bool OnMouseWheel(

       int Flags,

       short zDelta,

       int X,

       int Y)

 

C++

 

HRESULT OnMouseWheel(

       [in] long Flags,

       [in] short zDelta,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

ZDelta

Indicates distance rotated. The zDelta value is expressed in multiples or divisions of WHEEL_DELTA, which is 120. A value less than zero indicates rotating back (toward the user) while a value greater than zero indicates rotating forward (away from the user). The user can reverse this response by changing the wheel setting in the mouse software.

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

Once the method call is returned, pbHandled contains the Boolean return value that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnNetworkLinkLoadFailed

This event occurs when loading of a KML network link fails.

 

JavaScript

 

OnNetworkLinkLoadFailed (

       Path,

       Error)

 

C#

 

OnNetworkLinkLoadFailed (

       string Path,

       string Error)

 

C++

 

HRESULT OnNetworkLinkLoadFailed (

       [in] BSTR Path,

       [in] BSTR Error)

Parameters

Path

A full path or a URL to the network link.

Error

The description of the error when loading of the network link fails.

 

OnObjectAction

This event occurs when an action (e.g., fly to an object) is performed on an object.

 

JavaScript

 

OnObjectAction(

       ObjectID,

       Action)

 

C#

 

void OnObjectAction(

       string ObjectID,

       IAction80 Action)

 

C++

 

HRESULT OnObjectAction(

       [in] BSTR ObjectID,

       [in] IAction80* Action)

Parameters

ObjectID

The ID of the object on which the action was performed.

Action

An IAction80 representing the action that is performed on a TerraExplorer object. The following are possible values:

·          AC_FLYTO = 0
Fly to the object operation was started.

·          AC_CIRCLEPATTERN = 1
Circle object operation was started.

·          AC_OVALPATTERN = 2
Oval pattern around the object operation was started.

·          AC_LINEPATTERN = 3
Line pattern around the object operation was started.

·          AC_ARCPATTERN = 4
Arc pattern around the object operation was started.

·          AC_FOLLOWBEHIND = 5
Follow behind the object operation was started.

·          AC_FOLLOWABOVE = 6
Follow above the object operation was started.

·          AC_FOLLOWBELOW = 7
Follow below the object operation was started.

·          AC_FOLLOWRIGHT = 8
Follow from the right of the object operation was started.

·          AC_FOLLOWLEFT = 9
Follow from the left of the object operation was started.

·          AC_FOLLOWBEHINDANDABOVE = 10
Follow from behind and above the object operation was started.

·          AC_FOLLOWCOCKPIT = 11
Follow from cockpit operation was started.

·          AC_FOLLOWFROMGROUND = 12
Follow the object from the ground point operation was started.

·          AC_STOP = 13
The object operation was stopped (i.e., after a fly to operation).

·          AC_JUMP = 14
Jump to the object operation was started.

·          AC_DELETE = 15
The object was deleted.

·          AC_EDIT_FINISHED = 16
The object was finished being edited.

·          AC_OBJECT_ADDED = 17
An object was added to the project.

·          AC_PLAY = 18
Play operation for the object was started.

·          AC_SHOW = 19
A show or hide action was performed by clicking on the item show/hide icon.

·          AC_EDIT_STARTED = 20
Edit operation for the object was started.

·          AC_SELCHANGED = 21
A different object was selected.

·          AC_WAYPOINT_REACHED = 22
A dynamic object reached a way point, or the camera reached a presentation waypoint.

·          AC_GROUP_ADDED = 23
A group was added to the Project Tree.

·          AC_LAYER_ADDED =24
A feature layer was added to the project.

·          AC_LAYER_REFRESHED = 25
A feature layer was refreshed.

·          AC_ITEM_MOVED = 26
An item was moved in the Project Tree.

·          AC_LAYER_REMOVED = 27
A feature layer was removed from the project.

·          AC_3DML_ADDED = 28
A 3D mesh layer was added to the project.

·          AC_3DML_REMOVED = 29
A 3D mesh layer was removed from the project.

·          AC_DRAWING_OBJECT_STARTED = 30
The drawing of a terrain object (from the user interface or API using IDrawing) was started.

·          AC_DRAWING_OBJECT_FINISHED = 31
The drawing of a terrain object (from the user interface or API using IDrawing) ended.

·          AC_EDIT_CHANGE = 32
Object was modified from the Property Sheet. This value is only available for objects that support Undo/Redo edit actions, i.e., text and image labels, video objects, polylines, polygons, 2D and 3D shapes (except for 3D polygons), and 3D models.

OnObjectSelected

This event occurs when an object is selected in the 3D Window.

 

JavaScript

 

OnObjectSelected(

       ObjectID)

 

C#

 

void OnObjectSelected(

       string ObjectID)

 

C++

 

HRESULT OnObjectSelected(

       [in] BSTR ObjectID)

Parameters

ObjectID

The ID of the object that was selected.

OnObjectUnderCursorChanged

This event occurs when the object under the cursor is changed.

 

JavaScript

 

OnObjectUnderCursorChanged(

       ObjectEntered,

       ObjectID)

 

C#

 

void OnObjectUnderCursorChanged (

       bool ObjectEntered,

       string ObjectID)

 

C++

 

HRESULT OnObjectUnderCursorChanged (

       [in] VARIANT_BOOL ObjectEntered,

       [in] BSTR ObjectID)

Parameters

ObjectEntered

A Boolean that determines whether an object appears under the cursor.

ObjectID

The ID of the object under the cursor.

OnObjectUnselected

This event occurs when an object is unselected in the 3D Window.

 

JavaScript

 

OnObjectUnselected (

       ObjectID)

 

C#

 

void OnObjectUnselected (

       string ObjectID)

 

C++

 

HRESULT OnObjectUnselected (

       [in] BSTR ObjectID)

Parameters

ObjectID

The ID of the object that was unselected.

OnPresentationEvent

This event occurs when any change occurs in the running of a presentation, e.g., presentation started, action started, or action finished.

 

JavaScript

 

OnPresentationEvent (

       EventParameters)

 

C#

 

bool OnPresentationEvent (

       string EventParameters)

 

C++

 

HRESULT OnPresentationEvent (

       [in] BSTR EventParameters,

       [out, retval] VARIANT_BOOL* pbHandled))

Parameters

EventParameters

A JSON that describes the presentation event. The specific parameters for each event are defined in the PresentationJSONSchema.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the presentation event itself and does not wish TerraExplorer to respond. When the value is FALSE, TerraExplorer handles the event action.

 

OnPresentationStatusChanged

This event occurs when a presentation’s play status changes (e.g. to paused). 

 

JavaScript

 

OnPresentationStatusChanged(

       PresentationID,

       Status)

 

C#

 

void OnPresentationStatusChanged(

       string PresentationID,

       PresentationStatus Status)

 

C++

 

HRESULT OnPresentationStatusChanged(

       [in] BSTR PresentationID,

       [in] PresentationStatus Status)

Parameters

PresentationID

The ID of the presentation whose status has changed.

Status

The status of the presentation for which the event should be called. The following are the possible values:

·          PrevStepping – The presentation was rewound to play from the previous step.

·          Playing – The presentation is playing.

·          NextStepping – The presentation was fast forwarded to play from the next step.

·          Paused – Playback of the presentation was paused.

·          Stopped – Playback of the presentation was stopped.

OnProjectTreeAction

This event occurs when an action (e.g., object was deleted or shown) is performed on a Project Tree item.

 

JavaScript

 

OnProjectTreeAction(

       ID,

       Action)

 

C#

 

void OnProjectTreeAction(

       string ID,

       IAction80 Action)

 

C++

 

HRESULT OnProjectTreeAction(

       [in] BSTR ID,

       [in] IAction80* Action)

Parameters

ID

The ID of the object on which the action was performed.

Action

An IAction80 representing the action that is performed on an item. The following are possible values:

·          AC_DELETE = 15
The object was deleted.

·          AC_SHOW = 19
A show or hide action was performed by clicking on the item show/hide icon.

·          AC_SELCHANGED = 21
The current selected item(s) has changed.

·          AC_GROUP_ADDED = 23
A group was added.

·          AC_LAYER_ADDED = 24
A layer was added.

·          AC_LAYER_ REFRESHED = 25
A layer was refreshed.

·          AC_ITEM_MOVED = 26
An item was moved to a different location.

·          AC_LAYER_REMOVED = 27
A layer was removed.

·          AC_3DML_ADDED = 28
A 3DML was added.

·          AC_3DML_REMOVED = 29
A 3DML was removed.

OnPublishAborted

This event occurs when the publishing of a project is aborted.

 

JavaScript

 

OnPublishAborted()

 

C#

 

void OnPublishAborted()

 

C++

 

HRESULT OnPublishAborted()

 

OnPublishFinished

This event occurs when the publishing of a project is finished.

 

JavaScript

 

OnPublishFinished (

       json)

 

C#

 

void OnPublishFinished(

       string json)

 

C++

 

HRESULT OnPublishFinished(

       [in] BSTR json,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

json

A json with the URL's of the desktop, web, and mobile published projects. This json is returned when publishing to SGS using the PublishToSGS method. For example:

{

    "TE Desktop": "https://www.skylineglobe.com/SG/projects/SG.1111111",

    "TE Web": "https://www.skylineglobe.com/SG/terraexplorerweb/terraexplorer.html?catalogid=SG. 1111111",

    "TE Mobile": "https://www.skylineglobe.com/SG/terraexplorerweb/terraexplorer.html?catalogid=SG.11111111&isMobileApp=1"

}  

 

Return Value

pbHandled

A Boolean that indicates whether the client handled the completion of the publishing process and the display of the "Publishing project completed" dialog box itself, and does not wish TerraExplorer to respond. When the value is FALSE, TerraExplorer handles the completion of the publishing process.

A screenshot of a social media post Description automatically generated

OnPublishProgress

This event provides the client information regarding the publishing progress.

 

JavaScript

 

OnPublishProgress (

       Percentage)

 

C#

 

bool OnPublishProgress (

       double Percentage)

 

C++

 

HRESULT OnPublishProgress(

       [in] double Percentage,

       [out, retval] VARIANT_BOOL* pbCancelled)

Parameters

Percentage

The percentage of the publish process that was already performed.

Return Value

pbCancelled

A Boolean that indicates whether to cancel the publishing process. Returning TRUE cancels the process, while FALSE lets it continue.

OnRButtonDblClk

This event occurs when the user double-clicks the right mouse button.

 

JavaScript

 

OnRButtonDblClk(

       Flags,

       X,

       Y)

 

C#

 

bool OnRButtonDblClk(

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnRButtonDblClk(

       [in] long Flags,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnRButtonDown

This event occurs when the user presses the right mouse button.

 

JavaScript

 

OnRButtonDown(

       Flags,

       X,

       Y)

 

C#

 

bool OnRButtonDown(

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnRButtonDown(

       [in] long Flags,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnRButtonUp

This event occurs when the user releases the right mouse button.

 

JavaScript

 

OnRButtonUp(

       Flags,

       X,

       Y)

 

C#

 

bool OnRButtonUp(

       int Flags,

       int X,

       int Y)

 

C++

 

HRESULT OnRButtonUp(

       [in] long Flags,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.

OnRenderQualityChanged

This event occurs whenever the terrain quality that the user is currently viewing is updated.

 

JavaScript

 

OnRenderQualityChanged(

       Quality)

 

C#

 

void OnRenderQualityChanged(

       int Quality)

 

C++

 

HRESULT OnRenderQualityChanged(

       [in] int Quality)

Parameters

Quality

The new terrain quality that the user is viewing. The quality parameter is a number between 0 to 100 in increments of 10.

OnSGWorld

This event occurs when a specifiedTerraExplorer event takes place (e.g. application closes or save process finishes).

 

JavaScript

 

OnSGWorld(

       EventID,

       EventParam)

 

C#

 

void OnSGWorld(

       int EventID,

       object EventParam)

 

C++

 

HRESULT OnSGWorld(

       [in] long EventID,

       [in] VARIANT EventParam)

Parameters

EventID

The event’s ID. This parameter can be any of the following values:

·          TEE_APP_CLOSING         = 6

·          TEE_SAVE_FINISHED      = 9

·          TEE_SEARCH_RESULT     = 12

EventParam

This parameter is interpreted based on the EventID. For TEE_APP_CLOSING and TEE_SAVE_FINISHED, it is not used. For TEE_SEARCH_RESULT, a JSON is returned. See: IApplication.Search() for more information.

OnSGWorldMessage

TerraExplorer can notify the client when a message object is about to be triggered. The client can then either handle the message itself or let TerraExplorer handle it.

The value returned in SourceObjectID determines how the MessageID is interpreted.

 

JavaScript

 

OnSGWorldMessage(

       MessageID,

       SourceObjectID)

 

C#

 

bool OnSGWorldMessage(

       string MessageID,

       string SourceObjectID)

 

C++

 

HRESULT OnSGWorldMessage(

       [in] BSTR MessageID,

       [in] BSTR SourceObjectID,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

MessageID

This value is interpreted based on the returning value of SourceObjectID below:

SourceObjectID

The ID of any of the following:

·          If sent by an ITerraExplorerObject80 derived object – The ID of the object that owns the message object that is about to be triggered.
In this case, the MessageID is the ID of the message object that is about to be triggered.

·          If sent by IWindow80.ShowMessageBarText– “MessageBarText”. In this case, the MessageID contains the message text.

·          If sent by non- ITerraExplorerObject80 derived object – “ContainerMessage”. In this case, the MessageID contains the ID of a temporary message object that can only be accessed during the scope of the event.

·          If sent during Fly file load – “LoadFlyContainer”. In this case, MessageID contains a string combined from the container number, followed by a colon (“:”), followed by the URL to display.

Return Value

pbHandled

A Boolean that indicates whether or not the client handled the message itself and does not wish TerraExplorer to display the message. The value is FALSE when TerraExplorer handled the message.