CreateInstance

This method is used to create an object, generally an SGWorld66 instance, from a specific 3D Window. When using the ITE3DWindowEx interface to create multiple TE3DWindowEx objects in the same application, a specific SGWorld instance can be created using the CreateInstance method for each of the 3D windows. Each SGWorld instance can then load a different Fly file so that each window displays distinct content.

Example in C#:

SGWorld66 globe = (SGWorld66)axTE3DWindowEx1.CreateInstance("TerraExplorerX.SGWorld66");

 

JavaScript

 

CreateInstance(

       ProgID)

 

C#

 

dynamic CreateInstance(

       string ProgID)

 

C++

 

HRESULT CreateInstance(

       BSTR ProgID,

       IUnknown** ppUnk)

Parameters

ProgID

This parameter can be either of the following values:

·          ProgID of the desired object we want to create (e.g. “TerraExplorerX.SGWorld66”)

·          CLSID of the desired object (e.g. “{3A4F9199-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.