IObjectManager51

The interface is responsible for creating objects in a project. It is composed of many methods that create different objects. All of the objects that can be created via the IObjectManager51 interface are derived from ITerraExplorerObject5 interface. When creating an object (using one of the CreateXXX() methods) the client gets an interface (derived from ITerraExplorerObject5) to the newly created object. The client can then use this returned interface to further control the object (i.e. change its position or its color). 

When the client releases the object, it does not necessarily want to remove the object from the terrain as well. In one typical scenario, the client uses the IObjectManager51 to import objects into TerraExplorer Pro and wants them to remain on the terrain after it releases them. In TerraExplorer, this behavior is the default. If the client wants to completely remove the object from the terrain, it should set the ITerraExplorerObject5::KeepAliveOnRelease property to FALSE before releasing that object.

Each object created through the IObjectManager interface has an ID that uniquely identifies it in the TerraExplorer Pro world (the ITerraExplorerObject5::ID property). This ID can be used by the client to get an interface to that object using the GetObject() method of the IObjectManager interface. There are two ways in which the client can get a hold of that ID:

  1. By having the client himself create that object and store its ID for later use before releasing the object (without removing it from the terrain).

  2. By traversing the information tree and translating the ItemID into the object ID (using the IInformationTree5::GetObject() method).

When creating an object that is derived from ITerrainLocation5 the value used for the HeightStyle parameter in the CreateXXX() becomes the default altitude type for the object. Some of the ITerrainLocation5 methods are affected by this. The Elevation parameter in the ITerrainLocation5::SetPosition(),ITerrainLocation5::GetPosition() is used, based on the HeightStyle value used in the CreateXXX()method. You can get the default altitude type of the object by using the ITerrainLocation5::GetPositionEx() method.

Note: Older versions of this interface (e.g., IObjectManager4) are obsolete. Always use IObjectManager51 when using TerraExplorer v5.1 or later.

Hierarchy:

 

IObjectManager51

Methods:

CreatePolyline, Create2DPolygon, CreateRectangle, CreateRegularPolygon, CreateCircle, Create3DPolygon, CreateBuilding, CreateBox, CreatePyramid, CreateCylinder, CreateCone, CreateEllipse, CreateArc, CreateArrow, Create3DArrow, CreateSphere, CreateModel, CreateLabel, CreateLabelEx, CreateLocation, CreateTreeHotlink, CreateRoute, CreateMessage, GetObject, CreateImageLabel, CreateImageLabelEx, CreateDynamicObject CreateImageryLayer, CreateElevationLayer, CreateVideoOnTerrain, CreatePointCloudModel, CreateFromStream, GetFirstObjectPosition, GetNextObject, GetInfoTreeItemID, SetObjectParam, GetObjectParam, CreateTerrainModifier, CreateHoleOnTerrain