Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Opening the viewer of the PmaWorkspace object

The viewer of this object is opened by by the Pm.CreateView method, where in the sViewPath parameter the path to this object is entered.
 
The PmaWorkspace viewer allows to divide the window to several smaller portions. PmaWorkspace is most commonly displayed in an independent window (_blank), but can also be displayed in another PmaWorkspace.
Syntax:
JavaScriptSelect and copy to clipboard

var oCreator = Pm.CreateView(oFrom, sViewPath, sView, sFrame);
oCreator.Open();
Viewer parameters:
oFrom(Object) The object that mediates the opening of the viewer. It can be the PmaPanel, PmgFrame or PmaWorkspace. The object defines the origin of the path, the relative position of the vindow, the parent, etc.

The value null means that the active workspace is used (Pm.GetActiveWorkspace).

See the PmViewCreator.From property.

sViewPath(String) Path (relative or absolute) to the object or component whose viewer will be opened.

See the PmViewCreator.ViewPath property.

sView(String) Viewer parameters (they differ for various viewer types)

Entries are in KeyVal format, for example "name1:value1;name2:value2;".

See the PmViewCreator.View property.

 
Viewer parameters:
Arguments[optional] (Variant) (Variant) Value passed to the workspace viewer that is being opened. It can be a simple value (Integer, String, ...), array or object of the PmArray or PmMap type (it is not recommended to transfer objects of other types here). This value is then available:
- in the onOpen event
onOpen[optional] (Function) The event function for managing the event of viewer opening.

For JavaScript the object function is entered.

For VBScript the PmAction object is entered.

The function has a single parameter ev containing information regarding the corresponding event.

ev.Arguments - (Variant) Input value of the viewer. See Arguments.
onClose[optional] (Function) The event function for managing the event of viewer closing.

For JavaScript the object function is entered.

For VBScript the PmAction object is entered.

The function has a single parameter ev containing information regarding the corresponding event.

ev.CloseReason - (String) Identifier of the window closing type. It is always an empty string ("") for the workspace.
sFrame(String) Parameters for the frame where the viewer will be displayed

Entries are in KeyVal format, for example "target:_blank;".

See the PmViewCreator.Frame property.

The viewer parameters are in the form of the PmMap object that is filled from value of the sView parameter (of the KeyVal type) in the Pm.CreateView method.

By filling from the KeyVal value all the parameters are initially stored as string. The content of the PmMap object can be then modified as needed - the items can be modified, added and deleted.

The PmMap object can also contain other embedded PmMap objects (Submap). The PmMap.mapSetSubmapAt method can be used in order to create a new PmMap or make one accessible.

Example2:
JavaScriptSelect and copy to clipboard

Pm.CreateView(pMe.PmPanel, "/Workspace2", "", "target:_blank;").Open();

History:
Pm9.00.09: Created
PROMOTIC 9.0.10 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice