Sorts the items in the group according to specified sort type.
HRESULT SortGroup(
[in] long GroupID,
[in, defaultvalue(0)] SortType SType)
Parameters:
GroupID – The group that is 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 IInformationTree5::CreateGroup.
Find the group, if you know the name, using IInformationTree5::FindItem.
Traverse the Tree using IInformationTree5 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.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |
TE_E_MPTNOTLOADED |
An MPT file must be loaded in TerraExplorer for this method to work. |
TE_E_INFOTREE_ITEMNOTGROUP |
The item entered is not a group and therefore cannot be renamed. |
TE_E_NOLICENSE |
You are running TerraExplorer Viewer and therefore do not have permission to work with this interface. |