EVRIGUI Objects

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

Overview of the EVRIGUI Object

Eigenvector GUI Control (EVRIGUI) objects allow the creation and control of various Eigenvector graphical user interfaces (GUIs). At the present time, the following GUIs can be started and controlled using this functionality:

EVRIGUI objects allow starting a GUI and "attaching" to the given GUI such that controls on the GUI and data stored in that GUI can be manipulated by an external script or program. This functionality is available within the Matlab/PLS_Toolbox environment as well as from 3rd party programs when used with Eigenvector Research's stand-alone product, Solo. Use of this functionality with Solo requires the EigenvectorTools .NET object available free of charge to Solo licensees.

Creating New GUI

In general, an instance of a GUI and a corresponding EVRIGUI object is created using the command:

 obj = evrigui(' guitype ')

where 'guitype' is one of the valid EVRIGUI types listed in parentheses next to the types above. This call will create a new GUI of the specified type and returns (in "obj") an EVRIGUI object which provides methods and properties to control the given GUI. For example:

 obj = evrigui('analysis')

starts an Analysis GUI and provides the EVRIGUI object "obj" for control of that GUI.

Connecting to an Existing GUI

An EVRIGUI object can also be instructed to locate a currently open GUI of a given type and attach to that GUI. Include the flag '-reuse' on the evrigui creation command. For example:

 obj = evrigui('analysis','-reuse')

would look for an existing Analysis GUI and attach to it, allowing control through the returned object "obj". If no existing Analysis GUI is found, a new GUI is started, and the EVRIGUI object returned is attached to that new GUI.

Manipulating a GUI Using an EVRIGUI Object

Once a GUI has been created and attached to, the EVRIGUI object allows control over various properties and actions of the GUI using the "interface" method of evrigui. Given an EVRIGUI object named "obj" the following command returns a list of all available methods for the attached-to GUI:

 obj.interface

The particular interface options available are listed in the GUI object type pages:

Analysis_EVRIGUI_Object
Browse_EVRIGUI_Object

EVRIGUI objects allow direct access to all methods and properties using the "dot" notation on the EVRIGUI object. For example, the following issues the "calibrate" method for a given EVRIGUI object "obj":

 obj.calibrate

Similarly, the following accesses the "getVisibility" property

 obj.getVisibility

Note that all properties are generally accessed through methods called "set____" and "get____" where ___ is the property being set. For example, the Xblock property of an Analysis GUI would be set to a variable named "newdasta" using:

 obj.setXblock(newdata)

and would be retrieved using:

 currentdata = obj.getXblock

Generic EVRIGUI Properties

The following generic properties exist for all EVRIGUI object types:

.handle returns the numeric handle specific to the attached GUI
.isvalid returns logical (boolean) "true" if the GUI attached to still exists and is otherwise valid
.type returns a text string describing the type of GUI attached to this EVRIGUI object
.validmethods returns a list of the generic and specific methods which are valid for the give GUI

Generic EVRIGUI Methods

The following generic methods are defined for all EVRIGUI object types:

close closes the specified GUI
a==b returns true if EVRIGUI object a attaches to the same GUI as EVRIGUI object b
a~=b returns false if EVRIGUI object a attaches to the same GUI as EVRIGUI object b