Show Contents / Index / Search

Getting Terminal and View Objects

Refer to the following tables for ways to get and create terminal (control) and view objects.

Terminal Objects

Use this API call

To get

GetControlsByFilePath()

A collection of open terminal emulation sessions. This method requires the path to a saved session document and returns a collection of all open emulation sessions that were created from that file.

GetControlByInstanceId()

An open terminal emulation session. This method requires the session's instance ID. A unique instance ID is created for a session each time you open the session document.

CreateControl(filePath)

A new terminal emulation session by specifying the file path for an existing session document.

CreateControl(Guid controlType)

 

A new terminal emulation session.

Each session type requires a different GUID controlType.

3270 (IBM): Guid("{09E5A1B4-0BA6-4546-A27D-FE4762B7ACE1}")

5250 (IBM): Guid("{AF03A446-F278-4624-B9EF-C896DF2CA1CA}")

UNIX and OpenVMS (OpenSystems): Guid("{BE835A80-CAB2-40d2-AFC0-6848E486BF58}")

ReGIS Graphics (OpenSystems): Guid("{C62BA7E4-5A20-4681-931B-07BF7C971D13}")

View Objects

Each of the following methods gets the View object associated with a control.

When using this method

Provide this parameter

GetViewByTitleText()

The Name property from the Tab Properties dialog box of the session document view. For example, GetViewByTitleText(MySession.rd3x).

Note: To open the Tab Properties dialog box, right-click the session tab in the Reflection Workspace and choose Properties.

GetViewByInstanceID()

The API tab identifier number in the Tab Properties dialog box of the open session document. Each time you create a session document view, a new number is generated.

(The API tab identifier of a View is different from that of the embedded control.)

GetViewsByFilePath()

The path to which the session or Web page document has been saved.

Note: To re-create a View object after closing it, you must first re-create the control object that will be associated with the View.