Promotic
WikipediaLinkedInYoutubeTwitterFacebook

GetActiveWorkspace - method of object Pm

Description:
Returns the reference to active PmWorkspace object..
Syntax:
GetActiveWorkspace As Object
Calling:
Set o = Pm.GetActiveWorkspace
Note:

Caution! The method can return Nothing, 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 (PmWorkspace 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 PmWorkspace, that has been worked on for the last time (i.e. the workspace that has the focus).
 
This method is not functional for Web panels in JavaScript language (and therefore it is not working in Web panels).
Example:
Obtaining the reference to active PmWorkspace object and opening the "/panel1" panel in the main frame.
VBScriptSelect and copy to clipboard

Dim oWs
Set oWs = Pm.GetActiveWorkspace()
If Not oWs Is Nothing Then
  oWs.OpenView "/panel1", "target:main;", ""
End If
PROMOTIC 8.3.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.Tavičská 845/21 703 00 Ostrava-Vítkovice