EigenvectorTools: Difference between revisions
imported>Jeremy |
imported>Jeremy |
||
Line 27: | Line 27: | ||
|valign="top" | | |valign="top" | | ||
<tt>sendCommand(cmd)</tt> | <tt>sendCommand(cmd)</tt> | ||
| Send a string command "cmd" 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]]. | | Send a string command "cmd" 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]]. Any textural response from the application is stored in the read-only property ''lastResponse''. | ||
'''RETURNS:''' 0 if command was successful, -1 if the command failed due to low-level application error, or -2 if the command was invalid, there was a license error, or other high-level error. In either case, the textural response including any error can be found using the lastResponse property. | '''RETURNS:''' 0 if command was successful, -1 if the command failed due to low-level application error, or -2 if the command was invalid, there was a license error, or other high-level error. In either case, the textural response including any error can be found using the lastResponse property. | ||
|} | |} | ||
===Properties=== | ===Properties=== |
Revision as of 14:48, 8 April 2009
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
RETURNS: 0 if start was successful or -1 if the start failed. |
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(cmd) |
Send a string command "cmd" 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. Any textural response from the application is stored in the read-only property lastResponse.
RETURNS: 0 if command was successful, -1 if the command failed due to low-level application error, or -2 if the command was invalid, there was a license error, or other high-level error. In either case, the textural response including any error can be found using the lastResponse property. |
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). |
lastResponse |
Returns the string response returned by the server after the last sendCommand() call. [READ ONLY] |
(list incomplete...) |
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