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

GetObject

Returns an interface to the object based on the object ID.

 

JavaScript

 

GetObject(

      ObjectID)

 

C#

 

ITerraExplorerObject6 GetObject(

      string ObjectID)

 

C++

 

HRESULT GetObject(

      BSTR ObjectID,

      ITerraExplorerObject6** pITerraExplorerObject6)

 

Parameters

ObjectID

The ID of the object requested.

Return Value

pITerraExplorerObject6

An  ITerraExplorerObject6 representing the created object.

Exceptions

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

Remarks

In some situations, it is helpful to know the object ID , for example, when you need to get an interface to the object in order to perform some operation.