QPR Knowledge Base

GetActive

Hide Navigation Pane

GetActive

Previous topic Next topic No expanding text in this topic  

GetActive

Previous topic Next topic JavaScript is required for expanding text Mail us feedback on this topic!  

Comments (...)

Revision history:

Introduced in QPR 7.3.1

Last changed in QPR 8.1

 

Returns the ID of an item of the selected type that is active in the user interface.

 

Synopsis:

 

PGModel.GetActive(ActiveType, OutID)

 

Parameters:

 

ActiveType: String. The type of the active element wanted. Currently supported types are:

MODEL: Returns the ID of the model that is currently open.
PROCESSMODEL: Returns the ID of the process model element.
PROCESSLEVEL: Returns the process level ID of active flow chart or navigator window. If a top level flow chart is active, 0 is returned.
MAINPROCESSLEVEL: Returns the process level ID of the main (top) process level.
ELEMENT: Returns active flow chart or navigator window's active element ID. In the case multiple elements are selected, an error is returned.
USER: Returns the ID of the user who is currently logged in.
BASEMODEL: Returns the ID of the base model the current model is using. In the case the model does not use a base model, 0 is returned.
VIEWSETTINGS: Returns the ID of the view settings in the active view (Flow Chart or Navigator View).

OutID: Variant for storing the ID of the returned element. Integer.

 

Required Rights:

 

None.

 

Return Values:

Below are listed the return values that this function can return:

 

RV_SUCCESS

RV_APPLICATION_QUIT_CALLED

RV_MODEL_NOT_OPEN

RV_NO_ACTIVE_PROCESS_LEVEL

RV_NO_ACTIVE_ELEMENT

RV_NO_ACTIVE_VIEW_SETTINGS

RV_NOT_AUTHENTICATED

RV_INVALID_PARAMETER

 

Example Procedure:

 

iResult = PGModel.GetActive("USER", iId)

Comments (...)