EigenvectorTools

From Eigenvector Research Documentation Wiki
Revision as of 15:50, 3 April 2009 by imported>Jeremy
Jump to navigation Jump to search

The EigenvectorTools suite comprises a number of libraries which can be used on Windows to connect to Eigenvector Research's stand-alone software packages like Solo and Solo_Predictor. There are two versions of these tools:

  • EigenvectorToolsV6 : A standard Version 6 ActiveX object (referred to as "ETV6" in this document) written for best compatibility with older applications and those not wishing to run with Microsoft's .NET Framework.
  • EigenvectorTools : A .NET object (referred to as "ET.NET") recommended for any managed code applications built using Microsoft's .NET framework 1.1 or higher. Although ET.NET was written with COMInterop (i.e. allowing the .NET object to be accessed like a standard ActiveX object from older, non-managed code) but ETV6 is still the recommended object for use with these older platforms.

ETV6 and ET.NET both implement nearly identical interfaces into the main Solo application. The details of this interface are given below. ET.NET also includes socket communication and XML parsing tools which may be useful for some applications. These tools are not available in the ETV6 application.

Application Interface

The primary object in both versions of EigenvectorTools is an application object. The object's interface implements several start-up properties and several methods.

Methods

startApp()

Start up the Solo application

stopApp()

Stop the Solo application. Note that once stopApp has been called, it cannot be restarted without unloading EigenvectorTools. In general it is recommended that this method be called only when the client application is performing final cleanup before exiting. Note that this method is also automatically called when the application object is destroyed, thus, directly calling this method is usually not needed.

sendCommand(String cmd)

Send a text command to the Solo application. This command may be any of the simple object-creation commands described in the Solo_Predictor_User_Guide documentation or a command making use of EVRIGUI_Objects.

Properties

automation

Forces the application to open "silently" with no GUI to start. The application will then wait for commands passed through either the application interface or through the socket interface (unless the socket property is set to false - see below).

Examples

Visual Basic

The following is an example of instancing the EigenvectorToolsV6 interface in Visual Basic:

 Private solov6 As EigenvectorToolsV6.application
 Set solov6 = New EigenvectorToolsV6.application
  
 Dim tosend As String  'string to hold message we're sending
 Dim status As Long    'status integer returned
 Dim myresp As String  'string to hold response from server
  
 solov6.automation = True   'turn on automation
 solov6.socket = False      'turn OFF sockets
    

 If solov6.startApp Then
    ''' Could not start V6 server
 Else
    ''' Server started, send command
    status = solov6.sendCommand(tosend)
    If status = 0 Then
       ' Command successful
       myresp = solov6.lastResponse
    Else
       ' Server returned error
       myresp = "error code: " + Str(status) + vbCrLf + solov6.lastResponse
    End If
 End If