Home > Working with SGWorld > Creator (ICreator6) > CreateVideoOnTerrain

CreateVideoOnTerrain

The CreateVideoOnTerrain plays a movie draped on the terrain.

 

JavaScript

 

CreateVideoOnTerrain(

      VideoFileName,

      Position,

      GroupID ,

      Description )

 

C#

 

ITerrainVideo6 CreateVideoOnTerrain(

      string VideoFileName,

      IPosition6 Position,

      int GroupID = 0,

      string Description = "")

 

C++

 

HRESULT CreateVideoOnTerrain(

      BSTR VideoFileName,

      IPosition6* Position,

      LONG_PTR GroupID,

      BSTR Description,

      ITerrainVideo6** pITerrainVideo6)

 

Parameters

VideoFileName

A full pathname or a URL to the video file that you would like to import to the terrain.

Position

An  IPosition6  representing the position and orientation of the video object on the terrain.

GroupID

The Project Tree group in which the video on terrain is created. If it is set to zero, the object is created under the root. You can obtain the GroupID by one of the following methods:

§   Create the group using IProjectTree6.CreateGroup.

§  Find the group, if you know the name, using IProjectTree6.FindItem.

§  Traverse the Tree using IProjectTree6 methods such as GetNextItem(), until you come to the desired GroupID.

Description

The name of the Video On Terrain object as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.

Return Value

pITerrainVideo6

An ITerrainVideo6 representing the newly created video on terrain object.

Exceptions

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