GetViewInfo - method of the PmaWorkspace object
Description:
Returns the information about the viewer in the specified frame.
Syntax:
Array GetViewInfo(String sFrameId)
Parameters:
sFrameId | (String) Frame identifier for obtaining the information about currently open viewer. See the "Identifier" configurator in frame configuration. |
---|
Return value:
The method returns 1-dimensional array (
PmArray object for
JavaScript or
Array data type for
VBScript) of three values of the
String type.
These three strings represent the values of
sObjectPath,
sOptions and
sParams parameters, used when opening the viewer in current frame by the
CreateView method.
If there is no viewer open in current frame, then the method returns three empty strings.
If does not exist frame with defined identifier then the method returns:
null for
JavaScript or
Empty for
VBScript (it can be tested by the
Pm.IsValid method).
Note:
The knowledge of open viewer parameter values
sObjectPath,
sOptions and
sParams allows:
1) Find out, which viewer is currently open in specified frame (the value of sObjectPath is most significant).
2) Storing these three values is allowed by the
CreateView method, for opening the identic viewer later on.
Example:
Obtains the information about currently open viewer in the "main" frame.
JavaScriptVBScriptSelect and copy to clipboard
var aInf = oWorkspace.GetViewInfo("main");
var sObjectPath = aInf.GetItem(0);
var sOptions = aInf.GetItem(1);
var sParams = aInf.GetItem(2);
Dim aInf, sObjectPath, sOptions, sParams
aInf = oWorkspace.GetViewInfo("main")
sObjectPath = aInf(0)
sOptions = aInf(1)
sParams = aInf(2)