Promotic

GetActiveWorkspace - method of the Pm object

Description:
Returns active PmaWorkspace object..
Syntax:
Object GetActiveWorkspace()
Note:
Caution! The method can return null for JavaScript or Nothing for VBScript and therefore the result should be tested, in order to avoid calling the method over non-existing reference.

The method is often used when working with multiple open workspaces simultaneously (PmaWorkspace objects), for example when using multiple displays (see How to use a PROMOTIC application on two or more displays). In this case the method returns PmaWorkspace object, that has been worked on for the last time (i.e. the workspace that has the focus).

This method is not functional in Web panels.
See also:
- PmaWorkspace (object)
Example:
Obtains the reference to active PmaWorkspace object and opening the "/panel1" panel in the "main" frame.
JavaScriptVBScriptSelect and copy to clipboard

var oWs = Pm.GetActiveWorkspace();
if (oWs)
{
var oCreator = Pm.CreateView(oWs, "/panel1", "", "target:_blank;");
oCreator.Open();
}

History:
Pm8.00.06: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- GetActiveWorkspace
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r.o.