Views management

Methods

string ViewManagerGetRootGroupId ()
 Return the ID of the Root folder view.
int ViewGroupGetViewCount (string sFolderViewId)
 Return the number of views in the specified folder view.
string ViewGroupGetViewId (string sFolderViewId, int iIndex)
 Return the id of the specified view.
bool ViewGroupGetProperty (string qsViewId, string qsPropertyName)
 Fetch group view properties.
string ViewGetName (string sViewId)
 Fetch the view name.
string ViewGetType (string sViewId)
 Fetch the layer type.
string ViewGetProperty (string qsViewId, string qsPropertyName)
 Fetch a property of the view.
void ViewSetProperty (string qsViewId, string qsPropertyName, string qsPropertyValue)
 Change a property of the view.
string ViewGetIcon (string sViewId, string sOptions)
 Fetch the view icon.
string ViewGetIconUrl (string sViewId)
 Fetch the url of the view icon.
bool ViewStateActivate (string sViewId, bool bDirect)
 Activate the specified StateView view.
bool ViewStateGetProperty (string qsViewId, string qsPropertyName)
 Fetch state view properties.
string ViewStateGetAnimationId (string qsViewId)
 Fetch state view animation ID.
void ViewLayerControlSetVisibility (string sViewId, bool bVisible)
 Turn on or off view visibiliy.
bool ViewLayerControlGetVisibility (string sViewId)
 Fetch the view visibiliy. The view must exists and must have the type "LayerControl".
bool ViewLayerControlGetProperty (string sViewId, string sPropertyName)
 Fetch view properties.
double ViewLayerControlGetViewScale (string sViewId)
 Get the view scale of the view.
string ViewLayerControlGetLayerId (string sViewId)
 Get the ID of the layer controled by the layer control.
string ViewLayerControlGetRootGroupId (string sViewId)
 Get the top group item Id.
string ViewLayerControlGroupGetName (string sViewId, string sItemId)
 Get the name of the specified group item.
int ViewLayerControlGroupGetSubGroupCount (string sViewId, string sItemId)
 Get the count of subgroups in the current item.
string ViewLayerControlGroupGetSubGroupId (string sViewId, string sItemId, int iItemIndex)
 Get the id of the specified subgroups.
int ViewLayerControlGroupGetObjectCount (string sViewId, string sItemId)
 Get the number of objects in the current item.
string ViewLayerControlGroupGetObject (string sViewId, string sItemId, int iObjectIndex)
 Return the object with the specified index.
void ViewLayerControlGroupActivate (string sViewId, string sGroupId, bool bDirect)
 Activates the group.
void ViewLayerControlObjectActivate (string sViewId, string sObjectId, int iObjectIndex, bool bDirect)
 Activates the object.
int ViewLayerControlCategoryGetCount (string sViewId)
 Get the number of categories in the layer control.
bool ViewLayerControlCategoryGetProperty (string sViewId, int iCategoryIndex, string sPropertyName)
 Get the category property of the layer control.
string ViewLayerControlCategoryGetName (string sViewId, int iCategoryIndex)
 Get the category property of the layer control.
bool ViewSearchControlActivate (string sViewId)
 Set the search associated to the specified search control view as the current search.

Detailed Description

This group of functions is dedicated to the management of the views included in the project.

Views is an access to the thematic views stored in the loaded project.

Thematic views are stored in a tree structure defined in a project from SpacEyes3D Builder in order to create a thematic presentation of the model and facilitate it's use.

The following types of thematic views are managed:

Thematic views provide on one hand an instant access to chosen views (points of interest, highlights, animated sequences), and to pre-registered states; and allow on the other hand a direct control on the model contents (hide/show information layers...).

SpacEyes3D Plugin already proposes a default interface for the thematic views representation, but it can be disabled with UiElementSetVisibility to re-implement a custom interface.

The view manager functions of SpacEyes3D Plugin API allow to fully rebuild a custom view of the thematic views defined in the project.


Methods

string ViewGetIcon ( string   sViewId,
string   sOptions 
)

Fetch the view icon.

Parameters:
sViewId The Id of the view.
sOptions Icon format options.
Returns:
The icon of the view serialized in a string in the asked format.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
string ViewGetIconUrl ( string   sViewId  ) 

Fetch the url of the view icon.

The url is accessible only for http or local url, either an empty string is returned.

Parameters:
sViewId The Id of the view.
Returns:
The url of the view icon or empty.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
string ViewGetName ( string   sViewId  ) 

Fetch the view name.

Parameters:
sViewId The Id of the view.
Returns:
The name of the view.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
string ViewGetProperty ( string   qsViewId,
string   qsPropertyName 
)

Fetch a property of the view.

Available properties are :

  • "hidden" (bool)

boolean properties are converted into string "true" or "false".

Parameters:
qsViewId The Id of the view.
qsPropertyName The name of the property to fetch
Returns:
The value or the property or empty.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_NAME
string ViewGetType ( string   sViewId  ) 

Fetch the layer type.

Possible layer types are :

  • "Group",
  • "State",
  • "LayerControl",
  • "SearchControl".
Parameters:
sViewId The Id of the view.
Returns:
The type of the view.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
bool ViewGroupGetProperty ( string   qsViewId,
string   qsPropertyName 
)

Fetch group view properties.

Get the value of the named property of the group view. Available properties are :

  • "isOpen",

The group view must exist and must have the type "Group".

Parameters:
qsViewId The Id of the view.
qsPropertyName The name ot the property to fetch.
Returns:
The property value.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_NAME
int ViewGroupGetViewCount ( string   sFolderViewId  ) 

Return the number of views in the specified folder view.

Parameters:
sFolderViewId The Id of the group layer.
Returns:
The number of views contained in this folder.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
string ViewGroupGetViewId ( string   sFolderViewId,
int  iIndex 
)

Return the id of the specified view.

Return the id of the view with the index iIndex contained in the folder view sFolderViewId.

Parameters:
sFolderViewId The Id of the folder view.
iIndex The index of the concerned child layer.
Returns:
The id of the child view.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_INDEX
int ViewLayerControlCategoryGetCount ( string   sViewId  ) 

Get the number of categories in the layer control.

Parameters:
sViewId The Id of the layerControl view.
Returns:
The number of objects.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
string ViewLayerControlCategoryGetName ( string   sViewId,
int  iCategoryIndex 
)

Get the category property of the layer control.

Parameters:
sViewId The Id of the layerControl view.
iCategoryIndex The category index.
Returns:
The name of the category.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_INDEX
bool ViewLayerControlCategoryGetProperty ( string   sViewId,
int  iCategoryIndex,
string   sPropertyName 
)

Get the category property of the layer control.

Parameters:
sViewId The Id of the layerControl view.
iCategoryIndex The category index.
sPropertyName The name of the property to fetch. Possible Values are :

  • "openGroupsByDefault",
  • "activateGroupSelection".
Returns:
The value of the property.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_INDEX
  • E_BAD_NAME
string ViewLayerControlGetLayerId ( string   sViewId  ) 

Get the ID of the layer controled by the layer control.

Parameters:
sViewId The Id of the view.
Returns:
The layer ID.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
bool ViewLayerControlGetProperty ( string   sViewId,
string   sPropertyName 
)

Fetch view properties.

Get the value of the named property of the view. Available properties are :

  • "isContentsEnabled",
  • "isContentsOpen",
  • "useLayerStyleForIcon",
  • "isRootGroupsPrelisted",
  • "isTreeDisplayed",
  • "isControlLayerVisibility".

The view must exists and must have the type "LayerControl".

Parameters:
sViewId The Id of the view.
sPropertyName The name ot the property to fetch.
Returns:
The property value.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_NAME
string ViewLayerControlGetRootGroupId ( string   sViewId  ) 

Get the top group item Id.

Return the top group item Id.

Parameters:
sViewId The Id of the view.
Returns:
The item id.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
double ViewLayerControlGetViewScale ( string   sViewId  ) 

Get the view scale of the view.

Parameters:
sViewId The Id of the view.
Returns:
The view scale of the view.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
bool ViewLayerControlGetVisibility ( string   sViewId  ) 

Fetch the view visibiliy. The view must exists and must have the type "LayerControl".

Parameters:
sViewId The Id of the view.
Returns:
True if the layer controled by the view is visible, False otherwise.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
void ViewLayerControlGroupActivate ( string   sViewId,
string   sGroupId,
bool  bDirect 
)

Activates the group.

Parameters:
sViewId The Id of the view.
sGroupId The id of the item group.
bDirect Specify if the transition must be direct (True) or progressive (False).

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_ARG_2
string ViewLayerControlGroupGetName ( string   sViewId,
string   sItemId 
)

Get the name of the specified group item.

Return the top group item name.

Parameters:
sViewId The Id of the view.
sItemId The id of the item.
Returns:
The item name.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_ARG_2
string ViewLayerControlGroupGetObject ( string   sViewId,
string   sItemId,
int  iObjectIndex 
)

Return the object with the specified index.

Return the object with the specified index as a Json object with the following properties : "id", "name", "x", "y".

Example :

      {
         "id" : 123456,
         "name" : "Nice",
         "x": 2324434,
         "y": 7891011
      }
Parameters:
sViewId The Id of the concerned view.
sItemId The Id the containing item.
iObjectIndex The index of the Poi.
Returns:
The specified Poi if it exists, or an empty string.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_ARG_2
  • E_BAD_INDEX
int ViewLayerControlGroupGetObjectCount ( string   sViewId,
string   sItemId 
)

Get the number of objects in the current item.

Parameters:
sViewId The Id of the view.
sItemId The id of the item.
Returns:
The number of Poi.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_ARG_2
int ViewLayerControlGroupGetSubGroupCount ( string   sViewId,
string   sItemId 
)

Get the count of subgroups in the current item.

Parameters:
sViewId The Id of the view.
sItemId The id of the item.
Returns:
The number of subgroups.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_ARG_2
string ViewLayerControlGroupGetSubGroupId ( string   sViewId,
string   sItemId,
int  iItemIndex 
)

Get the id of the specified subgroups.

Parameters:
sViewId The Id of the view.
sItemId The id of the item.
iItemIndex The index of the subgroup item.
Returns:
The number of subgroups.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_ARG_2
  • E_BAD_INDEX
void ViewLayerControlObjectActivate ( string   sViewId,
string   sObjectId,
int  iObjectIndex,
bool  bDirect 
)

Activates the object.

Parameters:
sViewId The Id of the view.
sObjectId The id of the item object.
iObjectIndex The object index.
bDirect Specify if the transition must be direct (True) or progressive (False).

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_ARG_2
  • E_BAD_INDEX
void ViewLayerControlSetVisibility ( string   sViewId,
bool  bVisible 
)

Turn on or off view visibiliy.

Turns on/off the visibility of the layer controled by the view. The view must exists and must have the type "LayerControl".

Parameters:
sViewId The Id of the view.
bVisible Set to True to make the layer visible, False otherwise.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
string ViewManagerGetRootGroupId (  ) 

Return the ID of the Root folder view.

Returns:
The Id of the top view (which is a folder view).

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
bool ViewSearchControlActivate ( string   sViewId  ) 

Set the search associated to the specified search control view as the current search.

Parameters:
sViewId The Id of the concerned view.
Returns:
True is the view was activated, False otherwise.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
void ViewSetProperty ( string   qsViewId,
string   qsPropertyName,
string   qsPropertyValue 
)

Change a property of the view.

Available properties are :

  • "hidden" (bool)

boolean properties must be given as string "true" or "false".

Parameters:
qsViewId The Id of the view
qsPropertyName The name of the property to change
qsPropertyValue The value of the property to set

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_NAME
  • E_BAD_ARG
bool ViewStateActivate ( string   sViewId,
bool  bDirect 
)

Activate the specified StateView view.

Activate the specified view. The view must exists and must have the type "StateView".

Parameters:
sViewId The Id of the view.
bDirect Specify if the transition must be direct (True) or progressive (False).
Returns:
True is the view was activated, False otherwise.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
string ViewStateGetAnimationId ( string   qsViewId  ) 

Fetch state view animation ID.

Get the animation attached to the view if any

The view must exists and must have the type "State".

Parameters:
qsViewId The Id of the view.
Returns:
The animation ID or an empty string if there is no animation

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
bool ViewStateGetProperty ( string   qsViewId,
string   qsPropertyName 
)

Fetch state view properties.

Get the value of the named property of the view. Available properties are :

  • "hasAnimation",

The view must exists and must have the type "State".

Parameters:
qsViewId The Id of the view.
qsPropertyName The name ot the property to fetch.
Returns:
The property value.

Error codes: (can be obtained by a subsequent call to UtilityGetLastError)

  • E_FAILED
  • E_NO_SCENE
  • E_BAD_ID
  • E_BAD_NAME

SpacEyes3D Plugin SDK Documentation - generated on Thu Jun 28 09:18:18 2012 - SPACEYES