ProjectTree (IProjectTree80)

The IProjectTree80 interface allows you to manipulate the Project Tree items. This includes managing groups, items and layers. A Tree item is a group if it can have children items. It is important to note that items that are not groups can only be added through the ICreator80 interface, since it is used to create all the entities of TerraExplorer. These entities (i.e., a polyline on the terrain) are then represented in the Project Tree (as items inside groups). To rename an item in the Project Tree that is not a group, you should use the interface of that item. If you need to access a Project Tree element (for example, to change its position on the terrain) you use its ID that uniquely identifies it in the TerraExplorer Pro world (the ITerraExplorerObject80. ID property) to get an interface to that object using the GetObject method.

Note:    From API version 6.5 and above, elements no longer have an additional separate Project Tree ID; they only have a single object ID.

 

 

Properties

 

HiddenGroupID

Gets the ID of the hidden group tree element.

HiddenGroupName

Gets the name of the hidden group tree element.

NotInTreeID

Gets the ID that should be passed as an element’s ParentGroupID, if you do not want the element added to the Project Tree.

RootID

Gets the ID of the Tree root element.

ShowSearchTool

Gets and sets a Boolean that determines whether the search tool is displayed.

 

Methods

 

CreateGroup

Creates a group in the Project Tree.

CreateLockedGroup

Creates a group in a “locked” (collapsed) mode. When locked, TerraExplorer Viewer users cannot expand the group to view its contents.

DeleteItem

Deletes an item from the Project Tree (and from the terrain, if that item was a terrain object).

EditItem

Reserved. Currently not used. Use EditItemEx instead.

EditItemEx

This method replaces EditItem (now reserved) and should be used instead. Places a specified item in edit mode and positions the property sheet if opened in the specified position on the 3D Window. The flags parameter provides control over the display of the property sheet (e.g., whether to display the property sheet with or without the top toolbar) and over the initial edit and move modes.

EditItems

Opens the Multi Edit property sheet to edit multiple specified items.

EnableRedraw

Enables changes to be redrawn or prevents them from being redrawn in the Project Tree.

EndEdit

Terminates the EditItemEx mode.

ExpandGroup

Expands the specified group so that it displays all of its children, or collapses it.

FindItem

Finds an item using a path to that item.

GetActivationCode

Returns the activation code assigned for the specified group.

GetClientData

Returns the text string describing the group’s attribute data. This information is available for general use in your application.

GetGroupEndTime

Returns the specified group’s end date and time.

GetGroupLocation

Returns the location of the specified group.

GetGroupMessageID

Returns the message set for a specific group or layer in the Project Tree using its ID.

GetGroupStartTime

Returns the specified group’s start date and time.

GetItemName

Returns the name of a specific item using its ID.

GetLayer

Returns an interface to the IFeatureLayer80 object based on the specified group ID.

GetNextItem

Retrieves the Project Tree item that has the specified relationship, indicated by the Code parameter, to another item whose ID is specified.

GetObject

Returns an ITerraExplorerObject interface to an object based on its ID.

GetVisibility

Returns the visibility status of a Project Tree item on the terrain.

IsExpanded

This method checks whether or not a Project Tree group is expanded.

IsGroup

Determines whether or not a ProjectTree item is a group.

IsLayer

Obsolete. To determine whether a Project Tree element is a feature layer, use IProjectTree80.GetObject to return an interface to the element and then ITerraExplorerObject80. ObjectType to get the element type.

IsLocked

Determines whether or not a group is locked.

IsRadioGroup

Determines whether or not a group is a radio group.

LoadFlyLayer

Loads a Fly file into the current project. All the objects from the Fly file, including locations, routes and hyperlinks, are added.

LoadFlyLayerAsync   

Loads a Fly file into the current project. All the objects from the Fly file, including locations, routes and hyperlinks, are added. This method executes asynchronously, immediately returning an ITerraExplorerAsync80 object, thereby ensuring that control is promptly handed back to the calling function.

LoadKmlLayer

Loads a KML file into the current project. All the objects from the KML file, including locations, presentations, and hyperlinks, are added.

LockGroup

Sets a group to a “lock” (collapsed) status mode. When a group is locked, users of TerraExplorer Viewer cannot expand the group and view its contents.

RenameGroup

Renames a group in the Project Tree.

SaveAsFly

Saves the specified group to a Fly file.

SaveAsKml

Saves the specified object or group to a KML file.

SelectItem

Selects an item in the Project Tree.

SetActivationCode

Determines the default activation action executed when clicking on the locked group symbol.

SetClientData

Stores a text string in the group global namespace.

SetGroupEndTime

Determines the date and time when the group should stop being visible

SetGroupLocation

Determines the location parameters for a specified group.

SetGroupMessageID

Sets the message for a specific group or layer in the Project Tree using its ID.

SetGroupStartTime

Determines the date and time when the group should start being visible

SetParent

Moves an item to a different group.

SetRadioGroup

Sets a Boolean that determines whether the Project Tree group is a radio group, whose items are mutually exclusive or a standard group.

SetVisibility

Sets a ProjectTree item to be visible, or not visible, on the terrain.

ShowSubTree

Reserved

SortGroup

Sorts the items in the group according to specified sort type.

 

HiddenGroupID

Gets the ID of the hidden group tree element. When this ID is passed as an element’s ParentGroupID, the element will be added under a hidden group.

 

JavaScript

 

HiddenGroupID

 

C#

 

string HiddenGroupID { get; }

 

C++

 

HRESULT HiddenGroupID ([out, retval] BSTR* pVal)

 

HiddenGroupName

Gets the name of the hidden group tree element. When this name is passed as an element’s ParentGroupName, the element will be added under a hidden group.

 

JavaScript

 

HiddenGroupName

 

C#

 

string HiddenGroupName { get; }

 

C++

 

HRESULT HiddenGroupName ([out, retval] BSTR* pVal)

 

NotInTreeID

Gets the ID that should be passed as an element’s ParentGroupID, if you do not want the element added to the Project Tree.

 

JavaScript

 

NotInTreeID

 

C#

 

string NotInTreeID { get; }

 

C++

 

HRESULT NotInTreeID([out, retval] BSTR* pVal)

 

RootID

Gets the ID of the Tree root element. When this ID is passed as an element’s ParentGroupID, the element will be added under the Tree root.

Note:    In some methods (e.g. all CreateXXX methods such as Create3DArrow), an element can also be created under the Tree root by passing an empty string for the ParentGroupID.

 

JavaScript

 

RootID

 

C#

 

string RootID { get; }

 

C++

 

HRESULT RootID([out, retval] BSTR* pVal)

ShowSearchTool

Gets and sets a Boolean that determines whether the search tool is displayed.

 

JavaScript

 

ShowSearchTool

 

C#

 

bool ShowSearchTool { get; set;}

 

C++

 

HRESULT ShowSearchTool([out, retval] VARIANT_BOOL* pVal);

HRESULT ShowSearchTool([in] VARIANT_BOOL pVal)

 

CreateGroup

This method creates a group in the Project Tree.

 

JavaScript

 

CreateGroup(

       GroupName,

       ParentGroupID)

 

C#

 

string CreateGroup(

       string GroupName,

       string ParentGroupID = "")

 

C++

 

HRESULT CreateGroup(

       BSTR GroupName,

       BSTR ParentGroupID,

       BSTR * pVal) 

 

Parameters

GroupName

Name assigned to the group being created.

ParentGroupID

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

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

Return Value

pVal

The ID of the group being created.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

CreateLockedGroup

Creates a group in a “locked” (collapsed) mode. When locked, TerraExplorer Viewer users cannot expand the group to view its contents.

 

JavaScript

 

CreateLockedGroup(

       GroupName,

       ParentGroupID)

 

C#

 

string CreateLockedGroup(

       string GroupName,

       string ParentGroupID = "")

 

C++

 

HRESULT CreateLockedGroup(

       BSTR GroupName,

       BSTR ParentGroupID,

       BSTR * pVal) 

Parameters

GroupName

Name assigned to the group being created.

ParentGroupID

The Project Tree group in which the line of sight object is created. If it is set to an empty string, the object is created under the root. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

Return Value

pVal

The ID of the locked group being created.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

Remarks

It is recommended to use this feature to combine multiple objects into one virtual entity.

DeleteItem

Deletes an item from the Project Tree (and from the terrain, if that item was a terrain object such as a polyline).

 

JavaScript

 

DeleteItem(

       ID)

 

C#

 

void DeleteItem(

       string ID)

 

C++

 

HRESULT DeleteItem(

       BSTR ID)

 

Parameters

ID

The ID of the item to be deleted.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

Remarks

If ID is actually a group, all of the items under that group are also deleted.

EditItemEx

This method replaces EditItem (now reserved) and should be used instead. Places a specified item in edit mode and positions the property sheet, if opened, in the specified position on the 3D Window. The flags parameter provides control over the display of the property sheet (e.g., whether to display the property sheet with or without the top toolbar) and over the initial edit and move modes. In TerraExplorer GUI, these modes are set using the property sheet toolbar:

Graphical user interface, text, application Description automatically generated.

 

JavaScript

 

EditItemEx

       ID,

       Flags

       propertySheetVisibleGroups

       Left

       Top)

 

C#

 

void EditItemEx (  

       string ID,

       EditItemFlags Flags = EditItemFlags.EDIT_ITEM_SHOW_PROPERTY,

       object propertySheetVisibleGroups = 0,

       [int Left = int.MaxValue],

       [int Top = int.MaxValue])

 

C++

 

HRESULT EditItemEx (

       [in] BSTR ID,

       [in] EditItemFlags Flags,

       [in] VARIANT propertySheetVisibleGroups,

       [in] long Left,`

       [in] long Top)

Parameters

ID

The ID of the item to edit.

Flags 

An enum that determines the edit and move modes and the display of the property sheet. The Flags enum is divided into four subgroups. This parameter can use a combination of values from each of the subgroups, but no more than one value from each subgroup can be used. For example, pass both EDIT_ITEM_VERTICES & EDIT_ITEM_MOVE_MODE_Z to move a vertex in the Z plane.

Edit Mode Group – Use only one of the following values:

·          EDIT_ITEM_USE_PROPERTY = 0 (reserved)

·          EDIT_ITEM = 1
Sets the edit mode to edit polyline and polygon objects.

·          EDIT_ITEM_VERTICES = 2
Sets the edit mode to edit the nodes of polyline and polygon objects.

·          EDIT_ITEM_BUILDING_ROOF = 3
Sets the edit mode to edit the building roof.

·          EDIT_ITEM_MOVE_Y = 4 (reserved)

·          EDIT_ITEM_VERTICES_Y = 6 (reserved)

·          EDIT_ITEM_DRAG_TO_CURSOR = 7
Sets the edit mode to drag the object without an additional click. In all other modes, the mouse button must be held down while moving the object.

Property Sheet Display Group – Use only one of the following values:

·          EDIT_ITEM_SHOW_PROPERTY = 256
Open the property sheet including the top toolbar to edit the item.

·          EDIT_ITEM_SHOW_PROPERTY_TOOLBAR = 512
Open only the property sheet toolbar to edit the item.

·          EDIT_ITEM_SHOW_PROPERTY_WITHOUT_TOOLBAR = 1024
Open the property sheet without the top toolbar to edit the item.

·          EDIT_ITEM_SHOW_PROPERTY_WITH_UNDO_REDO_TOOLBAR = 2048
Open the property sheet with a toolbar that only includes the undo and redo commands.

Move Mode Group – Use only one of the following values:

·          EDIT_ITEM_MOVE_MODE_XY = 4096
Sets the edit mode to move in the XY plane.

·          EDIT_ITEM_MOVE_MODE_Z = 8192
Sets the edit mode to move in the Z plane.

·          EDIT_ITEM_MOVE_MODE_MAGNET = 16384
Sets the edit mode to move based on where the mouse is pointing in the 3D Window. This makes it easier to move an object or node on a vertical plane or above a 3DML layer or other terrain object.

Snap Group – Use only one of the following values:

·          EDIT_ITEM_SNAP_NEW = 32768
Sets the edit mode to snap to other objects based on the selected snapping option. See "Snapping Options" in ISGWorld.SetOptionParam and the TerraExplorer User Guide for more information.

propertySheetVisibleGroups

An array of enum values that determines the groups that should be visible in the property sheet. Only values relevant to the item being edited should be included in the array.

The following enum values are supported:

·          PSVG_NONE = 0,

·          PSVG_TRACK_LINE_STYLE = 1,

·          PSVG_APPEARANCE = 2,

·          PSVG_MODEL = 3,

·          PSVG_POSITION = 4,

·          PSVG_GEOMETRY = 5,

·          PSVG_SETTINGS = 6,

·          PSVG_GENERAL = 7,

·          PSVG_ATTACMENT_OFFSET = 8,

·          PSVG_ATTACHMENT_OBJECTS = 9,

·          PSVG_COLOR_AND_INTENSITY = 10,

·          PSVG_EFFECT = 11,

·          PSVG_FLOOD_DATA = 12,

·          PSVG_ELEVATION = 13,

·          PSVG_PROJECTION = 14,

·          PSVG_CONNECTION = 15,

·          PSVG_IMPORT_LAYER = 16,

·          PSVG_IMPORT_ATTRIBUTE_FIELDS = 17,

·          PSVG_LAYER_BOUNDING_BOX = 18,

·          PSVG_LOC = 19,

·          PSVG_VISIBILITY_CONDITION = 20,

·          PSVG_REFRESH_CONDITION = 21,

·          PSVG_SYMBOL = 22,

·          PSVG_IMAGE_LABEL_OPTIONS = 23,

·          PSVG_OBSERVER = 24,

·          PSVG_TARGETS = 25,

·          PSVG_ANALYSIS = 26,

·          PSVG_MODIFY_TERRAIN = 27,

·          PSVG_POINTS_POS = 28,

·          PSVG_LINE_STYLE = 29,

·          PSVG_LABEL_OPTIONS = 30,

·          PSVG_LABEL_ALIGNMENT = 31,

·          PSVG_3D_MODEL = 32,

·          PSVG_DYNAMIC_OBJS = 33,

·          PSVG_TEXTURE = 34,

·          PSVG_BUILDINGS = 35,

·          PSVG_POINT_CLOUD = 36,

·          PSVG_IMAGE_OPTIONS = 37,

·          PSVG_VOLUME = 38,

·          PSVG_MIN_MAX_VALS = 39,

·          PSVG_IMAGERY = 40,

·          PSVG_TEXT_OPTIONS = 41,

·          PSVG_TEXT_N_IMAGE_ALIGNMENT = 42,

·          PSVG_ATTRIBUTES = 43,

·          PSVG_OBJ_OPTIONS = 44,

·          PSVG_ROUTE_OPTION = 45,

·          PSVG_WAY_POINTS = 46,

·          PSVG_VIDEO = 47,

·          PSVG_PROJECTOR = 48,

·          PSVG_VIEWER_POS = 49,

·          PSVG_VISIBILITY = 50

Left

The property sheet's top left X position (in pixels) relative to the 3D Window top left position.

Top

The property sheet's top left Y position (in pixels) relative to the 3D Window top left position.

 

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

 

EditItems

Opens the Multi Edit property sheet to edit multiple specified items.

 

JavaScript

 

EditItems(Items)

 

C#

 

void EditItems(

       object Items)

 

C++

 

HRESULT EditItems(

       VARIANT Items)

 

Parameters

Items

An array that contains item IDs. Each item ID in the array is selected for the multi-edit operation.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

EnableRedraw

This method is used to allow or prevent redrawing of changes in the Project Tree.

 

JavaScript

 

EnableRedraw(bEnable)

 

C#

 

void EnableRedraw(

       bool bEnable)

 

C++

 

HRESULT EnableRedraw(

       VARIANT_BOOL bEnable)

Parameters

bEnable 

A Boolean that determines whether or not the Project Tree should be redrawn.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

Remarks

When adding several groups and objects at once, it is best to call EnableRedraw (FALSE), before starting to add items to the Tree, along with EnableRedraw(TRUE), after you have finished adding those items. This prevents a flashing effect and the constant repainting of the tree in the Project Tree. Instead, EnableRedraw repaints the Tree once all the items have been added.

EndEdit

This method terminates the EditItemEx mode.

 

JavaScript

 

EndEdit()

 

C#

 

void EndEdit()

 

C++

 

HRESULT EndEdit()

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

ExpandGroup

Expands the specified group (so that it displays all of its children) or collapses it.

 

JavaScript

 

ExpandGroup(

       GroupID,

       bExpand)

 

C#

 

void ExpandGroup(

       string GroupID,

       bool bExpand)

 

C++

 

HRESULT ExpandGroup(

       BSTR GroupID,

       VARIANT_BOOL bExpand) 

 

Parameters

GroupID

The ID the group that is expanded (or collapsed). You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

bExpand

A Boolean that determines whether the group is expanded or collapsed.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

FindItem

Finds an item using a path to that item.

Supported by TerraExplorer Viewer.

 

JavaScript

 

FindItem(PathName)

 

C#

 

string FindItem(

       string PathName)

 

C++

 

HRESULT FindItem(

       BSTR PathName,

       BSTR * pVal) 

 

Parameters

PathName

The exact path to the item being searched. Child items are separated by ‘\’ (i.e. “Cities\Boston”).

Return Value

pVal

The ID of the item that was found, or an empty string if no such item was found in the Project Tree.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

GetActivationCode

Returns the activation action assigned to the specified group.

 

JavaScript

 

GetActivationCode(GroupID)

 

C#

 

IAction80 GetActivationCode(

       string GroupID)

 

C++

 

HRESULT GetActivationCode(

       BSTR GroupID,

       IAction80 ** pVal) 

 

Parameters

GroupID

Refers to the group whose activation action is retrieved. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

Return Value

pVal

An IAction80 representing the activation action assigned to the group.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

GetClientData

The GetClientData method retrieves the text string stored in a specific namespace.

Note:    If you call this method with _All_Namespaces_ as the value for the Namespace parameter, a string is returned with all the namespaces separated by "|".

 

JavaScript

 

GetClientData(ID, Namespace)

 

C#

 

string GetClientData(

       string ID,

       string Namespace)

 

C++

 

HRESULT GetClientData(

       BSTR   ID,

       BSTR   Namespace,

       BSTR * ClientData) 

 

Parameters

ID

The item whose client data you want to retrieve

Namespace

The identifier of the text string.

Note:    If you call this method with _All_Namespaces_ as the value for the Namespace parameter, a string is returned with all the namespaces separated by "|".

Return Value

ClientData

A text string.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

GetGroupEndTime

This method returns the date and time on which the specified group no longer displays on the terrain.

 

JavaScript

 

GetGroupEndTime(GroupID)

 

C#

 

dynamic GetGroupEndTime(

       string        GroupID)

 

C++

 

HRESULT GetGroupEndTime(

       BSTR   GroupID,

       VARIANT * pVal) 

Parameters

GroupID

The Project Tree group whose end time is being retrieved. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

Return Value

pVal

The end time of the group. See “Time” in the “Basic Concepts” chapter for a list of valid formats for the time.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

GetGroupLocation

This method returns the location parameters of the specified group.

 

JavaScript

 

GetGroupLocation(GroupID)

 

C#

 

IPosition80 GetGroupLocation(

       string GroupID)

 

C++

 

HRESULT GetGroupLocation(

       BSTR   GroupID,

       IPosition80 ** pVal) 

Parameters

GroupID

The ID of the group whose location you are about to get. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

Return Value

pVal

An IPosition80 representing the location of the queried group.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

GetGroupMessageID

Returns the message set for a specific group or layer in the Project Tree using its ID.

 

JavaScript

 

GetGroupMessageID(

       GroupID)

 

C#

 

string GetGroupMessageID(

       string GroupID)

 

C++

 

HRESULT GetGroupMessageID(

       BSTR GroupID,

       BSTR* MessageID) 

Parameters

GroupID

The ID of the group orlayer whose name you are looking for. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup or create the layer using ICreator80.

·          Find the group or layer, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID or LayerID.

Return Value

MessageID

ID of the message object.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

 

GetGroupStartTime

This method returns the date and time on which the specified group is first visible on the terrain.

 

JavaScript

 

GetGroupStartTime(GroupID)

 

C#

 

dynamic GetGroupStartTime(

       int    GroupID)

 

C++

 

HRESULT GetGroupStartTime(

       LONG_PTR     GroupID,

       VARIANT *    pVal) 

Parameters

GroupID

The Project Tree group whose start time is being returned. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

Return Value

pVal

The start time of the group.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

GetItemName

Returns the name of a specific item in the Project Tree using its ID.

Supported by TerraExplorer Viewer.

 

JavaScript

 

GetItemName(

       ID)

 

C#

 

string GetItemName(

       string ID)

 

C++

 

HRESULT GetItemName(

       BSTR ID,

       BSTR * ItemText) 

Parameters

ID

The ID of the item whose name you are looking for.

Return Value

ItemText

The name of the item as it appears in the Project Tree.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

Remarks

This method can be used while traversing the Project Tree to obtain the real names of the items in the Tree.

GetLayer

The GetLayer method returns an interface to the IFeatureLayer80 object based on the specified ID. To determine whether GroupID is the ID of a feature layer, use IProjectTree80.GetObject to return an interface to the Project Tree element and then ITerraExplorerObject80. ObjectType to get the element type.

 

JavaScript

 

GetLayer(GroupID)

 

C#

 

IFeatureLayer80 GetLayer(

       string GroupID)

 

C++

 

HRESULT GetLayer(

       BSTR GroupID,

       IFeatureLayer80 ** pILayer) 

Parameters

GroupID

The ID of the layer item requested.

Return Value

pILayer 

An IFeatureLayer80 representing the layer object.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

GetNextItem

You can call this method to retrieve the Tree item that has the specified relationship, indicated by the Code parameter, to another item whose ID is specified.

Supported by TerraExplorer Viewer

 

JavaScript

 

GetNextItem(

       ID,

       Code)

 

C#

 

string GetNextItem(

       string ID,

       ItemCode Code)

 

C++

 

HRESULT GetNextItem(

       BSTR ID,

       ItemCode Code,

       BSTR * pVal) 

Parameters

ID

The reference item from which the next item is located.

Code

An enum that indicates what item is being searched (In relation to the ID parameter).

·          SELECTED – 10
The next selected item.

·          CHILD – 11
The first child item of ID.

·          FIRSTVISIBLE – 12
The first visible item in the Tree.

·          NEXT – 13
The next sibling item of ID.

·          NEXTVISIBLE – 14
The next visible item after ID.

·          PARENT – 15
The parent item of ID.

·          PREVIOUS – 16
The previous sibling item of ID.

·          PREVIOUSVISIBLE – 17
The previous visible item before ID.

·          ROOT – 18
The root of the Tree.

Return Value

pVal

The ID of the item found while using the reference item’s ID as the reference and the Code as the place to find the new item.

Exceptions

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

GetObject

Returns an interface to an object based on its ID. If IProjectTree80.GetObject fails, it might be that the item that you are trying to access is actually a group (which has no interface).

To determine whether a Project Tree element is a group, use IProjectTree80.IsGroup.

 

JavaScript

 

GetObject(

       ID)

 

C#

 

ITerraExplorerObject80 GetObject(

       string ID)

 

C++

 

HRESULT GetObject(

       BSTR ID,

       ITerraExplorerObject80 pITerraExplorerObject80) 

Parameters

ID

The requested item ID.

Return Value

ITerraExplorerObject80

An interface pointer to the object. This object is derived from ITerraExplorerObject80.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

GetVisibility

This method returns the visibility status of a Project Tree item on the terrain.

Supported by TerraExplorer Viewer.

 

JavaScript

 

GetVisibility(

       ID)

 

C#

 

int GetVisibility(

       string ID)

 

C++

 

HRESULT GetVisibility(

       BSTR ID,

       long * pVal) 

Parameters

ID

The ID of the Project Tree item in question.

Return Value

pVal

The visibility status:

·          0
Hide (the equivalent of the Show/Hide checkbox being unchecked in the Project Tree)

·          1
Show (the equivalent of the Show/Hide checkbox being checked)

·          2
Hide but show in Basic Viewer (the equivalent of the Show/Hide checkbox being filled in)

Note:    2 can only be returned for a group.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

IsExpanded

This method checks whether or not a Project Tree group is expanded. IsExpanded returns TRUE when the specified group is expanded.  .

 

JavaScript

 

IsExpanded(

       ID)

 

C#

 

bool IsExpanded (

       string GroupID)

 

C++

 

HRESULT IsExpanded (

       [in] BSTR GroupID,

       [out, retval] VARIANT_BOOL * pVal) 

Parameters

GroupID

The ID of the group in question.

Return Value

pVal

A Boolean that indicates whether or not the group is expanded.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

 

IsGroup

This method checks whether or not a ProjectTree item is a group. IsGroup returns TRUE when the ProjectTree item is a group.

 

JavaScript

 

IsGroup(

       ID)

 

C#

 

bool IsGroup(

       string ID)

 

C++

 

HRESULT IsGroup(

       BSTR ID,

       VARIANT_BOOL * pVal) 

Parameters

ID

The ID of the item in question.

Return Value

pVal

A Boolean that indicates whether or not the item ID given is the ID of a group.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

IsLayer

Obsolete. To determine whether a Project Tree element is a feature layer, use IProjectTree80.GetObject to return an interface to the element and then ITerraExplorerObject80. ObjectType to get the element type.

IsLocked

This method checks whether or not a group is locked. IsLocked returns TRUE when the specified group is locked.  

 

JavaScript

 

IsLocked(

       ID)

 

C#

 

bool IsLocked(

       string GroupID)

 

C++

 

HRESULT IsLocked(

       BSTR GroupID,

       VARIANT_BOOL * pVal) 

Parameters

GroupID

The ID of the group in question.

Return Value

pVal

A Boolean that indicates whether or not the group is locked.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

IsRadioGroup

This method checks whether or not a group is a radio group. IsRadioGroup returns TRUE when the specified group is a radio group. A group can be set as a radio group using SetRadioGroup.

 

JavaScript

 

IsRadioGroup(

       GroupID)

 

C#

 

bool IsRadioGroup (

       string GroupID)

 

C++

 

HRESULT IsRadioGroup (

       BSTR GroupID,

       VARIANT_BOOL * pVal) 

Parameters

ID

The ID of the group in question.

Return Value

pVal

A Boolean that indicates whether or not the group is a radio group.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

 

LoadFlyLayer

This method loads a Fly file into the current project. All the objects from the Fly file, including locations, presentations, and hyperlinks, are added.

This method executes synchronously, meaning it returns after the layer is created. If you want to execute synchronously, use LoadFlyLayerAsync instead.

 

JavaScript

 

LoadFlyLayer(

       FlyURL,

       ParentGroupID)

 

C#

 

string LoadFlyLayer(

       string FlyURL,

       string ParentGroupID = "")

 

C++

 

HRESULT LoadFlyLayer(

       BSTR FlyURL,

       BSTR ParentGroupID,

       BSTR * GroupID) 

Parameters

FlyURL 

A full path name or a URL to the Fly file to load.

ParentGroupID

The Project Tree group in which to put the objects from the imported Fly file. If set to zero, the object is created under the root. The layer objects are put in a group with the name of the Fly file (e.g., for the file “C:\MyFly.fly”, a new group named “MyFly” is created), and maintain the same internal group hierarchy as the loaded file. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem.

Return Value

GroupID

The ID of the newly created group which contains the Fly object.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

LoadFlyLayerAsync

This method loads a Fly file into the current project. All the objects from the Fly file, including locations, presentations, and hyperlinks, are added.

LoadFlyLayerAsync executes asynchronously, immediately returning an ITerraExplorerAsync80, thereby ensuring that control is promptly handed back to the calling function. The results are delivered when ready using the ITerraExplorerAsync80 object that was returned. The ITerraExplorerAsync80 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:

§   Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

§   Upon resolution of the query, enables the passing of the ID of the newly created group which contains the Fly object, to the OnResolve callback.

If you want to execute synchronously, use LoadFlyLayer instead.

 

JavaScript

 

LoadFlyLayerAsync(

       FlyURL,

       ParentGroupID)

 

C#

 

ITerraExplorerAsync80 LoadFlyLayerAsync(

       string FlyURL,

       string ParentGroupID = "")

 

C++

 

HRESULT LoadFlyLayerAsync(

       BSTR FlyURL,

       BSTR ParentGroupID,

       ITerraExplorerAsync80** pVal) 

Parameters

FlyURL 

A full path name or a URL to the Fly file to load.

ParentGroupID

The Project Tree group in which to put the objects from the imported Fly file. If set to zero, the object is created under the root. The layer objects are put in a group with the name of the Fly file (e.g., for the file “C:\MyFly.fly”, a new group named “MyFly” is created), and maintain the same internal group hierarchy as the loaded file. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem.

Return Value

pVal

An ITerraExplorerAsync80 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:

·          Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

·          Upon resolution of the query, enables the passing of the ID of the newly created group which contains the Fly object, to the OnResolve callback.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

 

LoadKmlLayer

This method loads a KML file into the current project. All the objects from the KML file, including locations, presentations, and hyperlinks, are added.

 

JavaScript

 

LoadKmlLayer(

       KmlURL,

       ParentGroupID)

 

C#

 

string LoadKmlLayer(

       string KmlURL,

       string ParentGroupID = "")

 

C++

 

HRESULT LoadKmlLayer(

       BSTR KmlURL,

       BSTR ParentGroupID,

       BSTR * GroupID) 

Parameters

KmlURL 

A full path name or a URL to the KML file to load.

ParentGroupID

The Project Tree group in which to put the objects from the imported KML file. If set to zero, the object is created under the root. The layer objects are put in a group with the name of the KML file (e.g., for the file “C:\MyKML.kml”, a new group named “MyKML” is created), and maintain the same internal group hierarchy as the loaded file. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem.

Return Value

GroupID

The ID of the newly created group which contains the KML object.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

 

LockGroup

The method sets a group to a “lock” (collapsed) status mode. When a group is locked, users of TerraExplorer Viewer cannot expand the group and view its contents.

 

JavaScript

 

LockGroup(

       GroupID,

       bLock)

 

C#

 

void LockGroup(

       string GroupID,

       bool bLock)

 

C++

 

HRESULT LockGroup(

       BSTR GroupID,

       VARIANT_BOOL bLock) 

Parameters

GroupID

The group whose lock status is changed. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

bLock

A Boolean that determines whether the group is locked or unlocked.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

 

RenameGroup

Renames a specified group in the Project Tree.

 

JavaScript

 

RenameGroup(

       GroupID,

       GroupName)

 

C#

 

void RenameGroup(

       string GroupID,

       string GroupName)

 

C++

 

HRESULT RenameGroup(

       BSTR GroupID,

       BSTR GroupName) 

Parameters

GroupID

Refers to the group that is renamed. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

GroupName 

The group’s new name.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SaveAsFly

This method saves the specified group to a Fly file. For security reasons the file is saved to a predefined “Skyline\TerraExplorer” folder in the “Application Data” space of the current user. The full path of the saved file is provided in the method’s return value. You can also use %APPDATA% in Windows Explorer to locate the path on your computer.

Note:    If the folder contains a file by the same name, the existing file is overwritten without a prompt.

Note:    The Application Data folder path changes between different users and different Windows operating systems. To find the path used by your client look at the %APPDATA% environment variable.

 

JavaScript

 

SaveAsFly(

       FlyName,

       GroupID)

 

C#

 

string SaveAsFly(

       string FlyName,

       string GroupID)

 

C++

 

HRESULT SaveAsFly(

       BSTR FlyName,

       BSTR GroupID,

       BSTR * pVal) 

Parameters

FlyName

The name for the Fly file. If it is not specified, a FLY extension is added to the file name automatically. 
Note: A file name with a full path cannot be used here.

GroupID

The group that is being saved to a FLY. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

Return Value

pVal

A full path of the Fly file being created.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SaveAsKml

This method saves the specified object or group to a compressed KML file (KMZ). For security reasons the file is saved to a predefined “Skyline\TerraExplorer” folder in the “Application Data” space of the current user. The full path of the saved file is provided in the method’s return value. You can also use %APPDATA% in Windows Explorer to locate the path on your computer.

 

Note:    If the folder contains a file by the same name, the existing file is overwritten without a prompt.

Note:    The Application Data folder path changes between different users and different Windows operating systems. To find the path used by your client look at the %APPDATA% environment variable.

JavaScript

 

SaveAsKml(

       KmlName,

       ObjectID)

 

C#

 

string SaveAsKml(

       string KmlName,

       string ObjectID)

 

C++

 

HRESULT SaveAsKml(

       BSTR KmlName,

       BSTR ObjectID,

       BSTR * pVal) 

Parameters

KmlName

The name for the KML file. If it is not specified, a KMZ extension is added to the file name automatically. If KML extension is specified, an uncompressed KML is created.
Note: A file name with a full path cannot be used here.

ObjectID

The object or group that is being saved to a KML file. You can obtain the ObjectID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the object or group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired ObjectID.

Return Value

pVal

A full path of the KML file being created.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SelectItem

This method selects an item in the Project Tree.

 

JavaScript

 

SelectItem(

       ID,

       Flags,

       Reserved)

 

C#

 

void SelectItem(

       string ID,

       int Flags = 0,

       int Reserved = 0)

 

C++

 

HRESULT SelectItem(

       BSTR ID,

       long Flags,

       long Reserved)

Parameters

ID

The ID of the item to select.

Flags

Currently not used. Always pass 0 (zero) for single selection.

Reserved

Reserved, always pass 0 (zero). Currently not used.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SetActivationCode

Determines the default activation action executed when clicking on the locked group symbol.

 

JavaScript

 

SetActivationCode(

       GroupID,

       ACode,

       ActivationParam)

 

C#

 

void SetActivationCode(

       string GroupID,

       ActionCode ACode,

       int ActivationParam = -1)

 

C++

 

HRESULT SetActivationCode(

       BSTR GroupID,

       ActionCode ACode,

       long ActivationParam) 

Parameters

GroupID

The ID of the group whose activation action is being set. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

ACode

An enum that determines the group's default activation action. The following are the possible values:

·          AC_FLYTO = 0

·          AC_CIRCLEPATTERN = 1,

·          AC_OVALPATTERN = 2

·          AC_LINEPATTERN = 3

·          AC_ARCPATTERN = 4

·          AC_FOLLOWBEHIND = 5

·          AC_FOLLOWABOVE = 6

·          AC_FOLLOWBELOW = 7

·          AC_FOLLOWRIGHT = 8

·          AC_FOLLOWLEFT = 9

·          AC_FOLLOWBEHINDANDABOVE = 10

·          AC_FOLLOWCOCKPIT = 11

·          AC_FOLLOWFROMGROUND = 12

·          AC_JUMP = 14

ActivationParam

When ACode is set to AC_SHOW, the ActivationParam can be one of the following values:

·          0 – The item is set to hide.

·          1 – The item is set to show.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SetClientData

This method stores a text string in the Project Tree item’s global namespace for the purpose of describing the item or any other purpose. You can store several text strings by using different namespaces. You can read this string by using the GetClientData method.

Note:    The SetClientData method stores the text string in the global namespace. You can access the global namespace by passing an empty string for the Namespace parameter.

 

JavaScript

 

SetClientData(

       ID,

       Namespace,

       ClientData)

 

C#

 

void SetClientData(

       string ID,

       string Namespace,

       string ClientData)

 

C++

 

HRESULT SetClientData(

       BSTR ID,

       BSTR Namespace,

       BSTR ClientData) 

Parameters

ID

The item whose client data we set.

Namespace

The identifier of the text string. You can store several text strings in the group by using different namespaces. You must use the correct namespace when accessing the client data using the GetClientData method.

ClientData

A text string. Note that the input string should not contain the formatting characters '\n' and '\r'.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SetGroupEndTime

Determines the date and time when the group should stop being visible on the terrain. 

 

JavaScript

 

SetGroupEndTime(

       GroupID,

       newVal)

 

C#

 

void SetGroupEndTime(

       string GroupID,

       object newVal)

 

C++

 

HRESULT SetGroupEndTime(

       BSTR GroupID,

       VARIANT newVal) 

Parameters

GroupID

The Project Tree group whose end time is being set. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

newVal

The end date and time for the group.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SetGroupLocation

Determines the location parameters for a specified group.

 

JavaScript

 

SetGroupLocation(

       GroupID,

       newVal)

 

C#

 

void SetGroupLocation(

       string GroupID,

       object newVal)

 

C++

 

HRESULT SetGroupLocation(

       BSTR GroupID,

       VARIANT newVal) 

Parameters

GroupID

Refers to the group whose location you are about to change. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

newVal

The location parameters for the specified group.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SetGroupMessageID

Sets the message for a specific group or layer in the Project Tree using its ID.

 

JavaScript

 

SetGroupMessageID(

       GroupID

       MessageID) 

 

C#

 

SetGroupMessageID(

       string GroupID,

       string MessageID) 

 

C++

 

HRESULT SetGroupMessageID(

       BSTR GroupID,

       BSTR MessageID) 

Parameters

GroupID

The ID of the group whose name you are setting. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup or create the layer using ICreator80.Create[Layer Type]Layer.

·          Find the group or layer, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID or LayerID.

MessageID

The ID of the message object.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

 

 

SetGroupStartTime

Determines the date and time when a group should start being visible

 

JavaScript

 

SetGroupStartTime(

       GroupID)

 

C#

 

dynamic SetGroupStartTime(

       string GroupID)

 

C++

 

HRESULT SetGroupStartTime(

       BSTR GroupID,

       VARIANT * pVal) 

Parameters

GroupID

The Project Tree group whose start time is being set. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

Return Value

pVal

The start date and time for the group.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SetParent

Moves an item to a different group.

 

JavaScript

 

SetParent(

       ID,

       ParentGroupID)

 

C#

 

void SetParent(

       string ID,

       string ParentGroupID)

 

C++

 

HRESULT SetParent(

       BSTR ID,

       BSTR ParentGroupID) 

Parameters

ID

Specifies which item is placed within the new parent group.

ParentGroupID

The ID of the item that becomes the new parent for the item specified by the ID parameter. The ParentGroupID must be a valid group ID.

Exceptions       

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

Remarks

SetParent is equivalent to dragging an item into another group.

SetRadioGroup

Sets a Boolean that determines whether the Project Tree group is a radio group, whose items are mutually exclusive, i.e., only one item in the group can be selected at any time, or a standard group. Call the IsRadioGroup method to check whether a group is a radio group.

A screenshot of a cell phone Description generated with very high confidence

Example of Radio Group in Project Tree

 

JavaScript

 

SetRadioGroup(

       GroupID

       pVal)

 

C#

 

SetRadioGroup (

       string GroupID

       bool, pVal)

 

C++

 

HRESULT SetRadioGroup (

       BSTR GroupID,

       VARIANT_BOOL pVal) 

Parameters

GroupID

The ID of the group being set as a radio group. The GroupID must be a valid group ID.

pVal

A Boolean that determines whether to set the group as a radio group (TRUE), or as a standard group (FALSE).

Exceptions       

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

Remarks

SetParent is equivalent to dragging an item into another group.

 

SetVisibility

This method sets a Project Tree item’s visibility on the terrain.

 

JavaScript

 

SetVisibility(

       ID,

       bShow)

 

C#

 

void SetVisibility(

       string ID,

       bool bShow)

 

C++

 

HRESULT SetVisibility(

       BSTR ID,

       VARIANT_BOOL bShow) 

Parameters

ID

The ID of the item.

bShow

A Boolean that determines whether the Project Tree item is visible on the terrain.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.

SortGroup

Sorts the items in the group according to the specified sort type.

 

JavaScript

 

SortGroup(

       GroupID,

       SType)

 

C#

 

void SortGroup(

       string GroupID,

       SortType SType = SortType.SORT_ALPHABETICALLY_AZ)

 

C++

 

HRESULT SortGroup(

       BSTR GroupID,

       SortType SType) 

Parameters

GroupID

The ID of the group that is to be sorted. If it is set to zero, the root group is sorted. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 methods such as GetNextItem, until you come to the desired GroupID.

SType

An enum that determines the type of sort that is performed on the group.

·          SORT_ALPHABETICALLY_AZ = 0
Ascending alphabetical sort.

·          SORT_ALPHABETICALLY_ZA = 1
Descending alphabetical sort.

·          SORT_BY_TYPE = 2
Sort by TerraExplorer type. The objects are sorted in the following order: Aerial Dynamic Object; Ground Dynamic Object; Route; Location; Text Label; Image Label; Static 3D Model; 2D Polygon; Rectangle; 3D Polygon; 2D Arrow; 3D Arrow; Arc; Ellipse; Circle; Sphere; Cone; Cylinder; Building; Pyramid; Box; Group. Objects of the same type are sorted alphabetically (A>Z).

·          SORT_NO_SORT = 3
No sort used.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.