GefProcAction.SetToOpenScreenExGeometry (method)

Configures the action to open a screen using a geometry string to position the screen.
Syntax: object.SetToOpenScreenExGeometry ScreenName, BaseProject, PercentZoom, Captive, Geometry, SendPublicVarValues, VariableValues
Parameters:
ScreenName As String -
BaseProject As String -
PercentZoom As long -
Captive As Boolean -
Geometry As String -
SendPublicVarValues As Boolean -
Optional VariableValues As VARIANT - A CoCimSafeArray3 array of initial variable values for the newly opened screen. (Note: In VBScript and VBA/VB, you can use a native array of strings.)
Description: Changes the Type of the action to GefActionOpenScreen.

The arguments correspond to the fields in the action panel of the Procedure Information dialog box.

The Geometry parameter specifies the location of the new window. If the Geometry paramater also specifies a size the PercentZoom will be ignored and the screen will be zoomed to fit the size specified in the geometry.

The SendPublicVarValues parameter is a boolean value that when true causes the values of the public variables of of the calling screen to be passed to the screen being opened. The public variable values will override any values in the VariableValues array that have the same name.

The VariableValues parameter is a String array containing the initial values of variables in the new screen. If NVARS is the number of variables, the array should be dimensioned as

    Dim initVars as CoCimSafeArray2
    Set initVars = CreateObject("CIMPLICITY.CimSafeArray.2")
    cimsafe.CreateVector cimVString, 0, 2*NVARS

or

    Dim initVars(0 To 2*NVARS-1) as String

where initVars.Element(0) is the name of first variable and initVars.Element(1) is the value of the first variable.

This array may also be dimensioned as

    Dim initVars(0 To 1, 0 To NVARS-1) as String

in which case initVars(0,0) is the name of the first variable and initVars(1,0) is the value of the first variable.

Example:

Sub MakeOpenScreen(action As GefProcAction)
  Dim initVars As CoCimSafeArray2
  Set initVars = CreateObject("CIMPLICITY.CimSafeArray.2")
  initVars.CreateVector cimVString, 0, 6
  initVars.SetVectorElement 0, "tank1"
  initVars.SetVectorElement 1, "LB23_2"
  initVars.SetVectorElement 2, "tank2"
  initVars.SetVectorElement 3, "LB23_4"
  initVars.SetVectorElement 4, "tank3"
  initVars.SetVectorElement 5, "LB23_6"
  action.SetToOpenScreenExGeometry "tankfarm.cim", "", 100, False, _
    "90%x90%+c+c@2W", True, initVars
End Sub
See Also: GefScreen.PositionWithGeometry , GetOpenScreenEx3 , GetOpenScreen , GetOpenScreenEx , GetOpenScreenEx2 , SetToOpenScreen , SetToOpenScreenEx