Promotic
WikipediaLinkedInYoutubeTwitterFacebook

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 pro VBScript, 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, 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:
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)
Pm.CreateView(oWs, "/panel1", "", "target:_blank;").Open();

History:
Pm8.00.06: Created
PROMOTIC 9.0.17 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.Tavičská 845/21 703 00 Ostrava-Vítkovice