EigenvectorTools: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
 
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__TOC__
__TOC__
==Introduction==
==Introduction==
NOTE: As of November 2021 (Solo 9.0) EigenvectorTools is transitioning to our [[Software_Development_Kit_(SDK)]]. Current versions of Solo and Solo+MIA don't include EigenvectorTools, versions including EigenvectorTools are available by special request. Solo_Predictor does include EigenvectorTools but will transition in near future.


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:
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. See the note below regarding limitations when using ETV6 on 64-bit operating systems.
* '''EigenvectorToolsV6 :''' A standard Version 6 ActiveX object ("ETV6") written for best compatibility with older applications and those not wishing to run with Microsoft's .NET Framework. See the note below regarding limitations when using ETV6 on 64-bit operating systems. '''IMPORTANT: ETV6 has been removed in newer versions. ETV6 is only available for use in Solo_Predictor versions 3.6.2 and earlier. (32-bit versions only)'''


* '''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 (Visual Studio 2003, 2005, or later). 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.  
* '''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 (Visual Studio 2003, 2005, or later). 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.  
Line 10: Line 13:
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.
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.


'''Notes for use on 64-bit systems:''' Although either ETV6 or ET.NET can be used with the 32-bit versions of our products, ETV6 '''cannot''' be used with the 64-bit versions. If you need to use the ETV6 interface on a 64-bit system (for use with an older application, for example), it can only be used with the 32-bit versions of Eigenvector's products. To use this interface with our 64-bit products, you must use the ET.NET version of the interface. A compatibility table is given below.
'''Notes for use on 64-bit systems:''' If you need to use the ETV6 interface on a 64-bit system (for use with an older application, for example), it can only be used with older 32-bit versions of Eigenvector's products. To use this interface with our 64-bit products, you must use the ET.NET version of the interface. Furthermore, a 32-bit and 64-bit version of ET.NET is provided in the distribution. In general, the version used should be matched to the user's calling application (a 64-bit application should use the 64-bit ET.NET; a 32-bit application should use the 32-bit ET.NET). A compatibility table is given below.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 20: Line 23:
| '''32-bit Windows''' || ETV6 ''or'' ET.NET || ''n/a''
| '''32-bit Windows''' || ETV6 ''or'' ET.NET || ''n/a''
|-
|-
| '''64-bit Windows''' || ETV6 ''or'' ET.NET || ET.NET
| '''64-bit Windows''' || ETV6 ''or'' ET.NET* || ET.NET*
|}
|}
<nowiki>*</nowiki> Either the 32-bit or 64-bit version of ET.NET can be used, but should be matched to the application instancing ET.NET


==Installation==
==Installation==
Line 27: Line 32:
# Download the version of Solo, Solo_Predictor or other stand-alone application which will be controlled by EigenvectorTools from your account at [[http://download.eigenvector.com http://download.eigenvector.com]]
# Download the version of Solo, Solo_Predictor or other stand-alone application which will be controlled by EigenvectorTools from your account at [[http://download.eigenvector.com http://download.eigenvector.com]]
# Run the stand-alone application installer downloaded in the previous step. '''NOTE:''' This installation will include the option to add the product to the Windows system path. This step '''must''' be completed for EigenvectorTools to function. If the option is not available or not selected, please see the troubleshooting section. If multiple Eigenvector applications are installed on the same system, only the first one on the system path will be accessible through the EigenvectorTools interface.
# Run the stand-alone application installer downloaded in the previous step. '''NOTE:''' This installation will include the option to add the product to the Windows system path. This step '''must''' be completed for EigenvectorTools to function. If the option is not available or not selected, please see the troubleshooting section. If multiple Eigenvector applications are installed on the same system, only the first one on the system path will be accessible through the EigenvectorTools interface.
# Download the EigenvectorTools application from your account at [[http://download.eigenvector.com http://download.eigenvector.com]]
# The EigenvectorTools application will be installed along with the stand-alone application and will be found in a folder named "eigenvectortools" under the main application folder. The DLLs referred to below will be in the <tt>eigenvectortools/bin/x86</tt> folder for 32-bit versions of ET and the <tt>eigenvectortools/bin/x64</tt> folder for 64-bit versions of ET. Note that all types of ET tools are shipped with all products, whether or not the main product is the 32- or 64-bit version.
# Unzip the EigenvectorTools ZIP file into a new folder. This folder can be located anywhere convenient on your system. A folder named <tt>C:/Program Files/EVRI/EigenvectorTools</tt> is a reasonable default location.
# Using an account with administrative privileges, complete one of the two following steps depending on the version of EigenvectorTools you are installing:
# Using an account with administrative privileges, complete one of the two following steps depending on the version of EigenvectorTools you are installing:
#* '''EigenvectorToolsV6''': In the folder containing the <tt>EigenvectorToolsV6</tt> application, drag the <tt>EigenvectorToolsV6.dll</tt> to the <tt>regsvr32.exe</tt> application.
#* '''EigenvectorTools''': In the folder containing the <tt>EigenvectorTools</tt> application, drag the <tt>EigenvectorTools.dll</tt> to the <tt>regasm.exe</tt> application. Then copy the <tt>EigenvectorTools.dll</tt> into a folder on your system path (such as the Solo or Solo_Predictor folder on your path) or into the folder in which the 3rd party application resides. See the [[#Troubleshooting|Troubleshooting]] section below.
#* '''EigenvectorTools''': In the folder containing the <tt>EigenvectorTools</tt> application, drag the <tt>EigenvectorTools.dll</tt> to the <tt>regasm.exe</tt> application. Then copy the <tt>EigenvectorTools.dll</tt> into a folder on your system path (such as the Solo or Solo_Predictor folder on your path) or into the folder in which the 3rd party application resides. See the [[#Troubleshooting|Troubleshooting]] section below.


Line 42: Line 45:
==Application Interface==
==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. For ETV6, the base object is instanced by creating a new EigenvectorToolsV6.application object. For ET.NET, the base object is instanced by creating a new Eigenvector.application object. Note that the ET.NET version also has two other objects (socketClient and numericParser) which can be instanced using the same namespace (Eigenvector.socketClient and Eigenvector.numericParser).
The primary object in both versions of EigenvectorTools is an '''application''' object. The object's interface implements several start-up properties and several methods. For ET.NET, the base object is instanced by creating a new Eigenvector.application object. Note that the ET.NET version also has two other objects (socketClient and numericParser) which can be instanced using the same namespace (Eigenvector.socketClient and Eigenvector.numericParser).


===Methods===
===Methods===


{| border="1" cellpadding="5" cellspacing="0" align="left"
{| border="1" cellpadding="5" cellspacing="0"
|-
|-
|valign="top" |
|valign="top" |
Line 69: Line 72:




{| border="1" cellpadding="5" cellspacing="0" align="left"
{| border="1" cellpadding="5" cellspacing="0"
|-
|-
|valign="top" colspan="2"|
|valign="top" colspan="2"|
Line 79: Line 82:
|-
|-
|valign="top" |
|valign="top" |
<tt>allowedLength</tt>         
<tt>allowedLength</tt><br>       
| Maximum string length allowed to be returned in lastResponse
<tt>allowedLengthLong</tt>         
| Maximum string length allowed to be returned in lastResponse. '''In ET.NET''': allowedLength property is a Long integer type and allowedLengthLong is not available. Both set the maximum length of string returned, but allowedLength property is typed as a Short Integer while the allowedLengthLong property is typed a Long Integer. In general, allowedLenghtLong should be used in ETV6 but allowedLength is supported to allow backwards compatibility. Maximum length of string when setting using the Short Integer version of this property is 65535 characters.
|-
|-
|valign="top" colspan="2"|
|valign="top" colspan="2"|
Line 89: Line 93:
<tt>debugMode</tt>     
<tt>debugMode</tt>     
| Boolean flag indicating if additional startup output should be given. Usually, this output will be written to a file named solo_debug.log in the user's temp directory.
| Boolean flag indicating if additional startup output should be given. Usually, this output will be written to a file named solo_debug.log in the user's temp directory.
'''Note:''' In EigenvectorToolsV6, this property is named debugMode to avoid namespace conflicts.
'''Note:''' In EigenvectorToolsV6, this property is named debugMode to avoid namespace conflicts.
|-
|-
Line 94: Line 99:
<tt>licensecode</tt>  
<tt>licensecode</tt>  
| String indicating the activation / license code to use with the application. Any previous code will be erased before using this code. If this code is not valid for the given version and product, the application will fail to start.
| String indicating the activation / license code to use with the application. Any previous code will be erased before using this code. If this code is not valid for the given version and product, the application will fail to start.
'''Note:''' for Solo_Predictor and other products that ''require'' a default.xml file, this property will not be used unless a valid default.xml has been found (see settingsFile property for a method to specify the location of this file). However, the default.xml file does not need to have a valid licensecode in it if this property is set. This is not the case for Solo or Solo+MIA which do not require a default.xml file.
|-
|-
|valign="top" |
|valign="top" |
<tt>settingsFile</tt>
<tt>settingsFile</tt>
|String indicating an alternative settingsFile to load (instead of the default: default.xml). Also allows specifying location of default.xml when it can't be found automatically by the application. '''Note:''' In Solo and Solo+MIA, the contents of specified file will only be used when an existing setting is not currently specified. Thus, this setting should be used in conjunction with clearSettings property to assure these settings are used.
|String indicating an alternative settingsFile to load (instead of the default: default.xml). Also allows specifying location of default.xml when it can't be found automatically by the application.
 
'''Note:''' In Solo and Solo+MIA, the contents of specified file will only be used when an existing setting is not currently specified. Thus, this setting should be used in conjunction with clearSettings property to assure these settings are used.
|-
|-
|valign="top" |
|valign="top" |
Line 130: Line 139:
|}
|}


===Examples===
&nbsp;
 
 
====Visual Basic with ETV6====
 
The following is an example of instancing the EigenvectorToolsV6 interface in Visual Basic. This demonstrates how to make calls to Solo or Solo_Predictor through EigenvectorToolsV6 object. To learn more about the scripting format (the "tosend" string included below), see the [[Solo Predictor Script Commands Summary]] and [[Solo_Predictor_Script_Construction#Scripting_Examples|Scripting Examples]] pages.
 
To instance the ETV6 object, you must add a reference to the EigenvectorToolsV6 object in your project in Visual Studio.
 
<pre>
Dim solo As EigenvectorToolsV6.application
Set solo = 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
 
solo.automation = True  'turn on automation
solo.socket = False      'turn OFF sockets
   
 
If solo.startApp Then
    ''' Could not start V6 server
    '''  -- usually throw some error --
Else
    ''' Server started, send command
 
    tosend = ":plain; model = 'mymodel.mat'; data = 'mydata.txt'; pred = data|model; pred.prediction;"
 
    status = solo.sendCommand(tosend)
    If status = 0 Then
 
      ' Command successful
      myresp = solo.lastResponse
      myval  = Val(myresp)        ''convert to double (assumes only one value in myresp)


    Else
==Examples==


      ' Server returned error
===Visual Basic with ETV6===
      myresp = "error code: " + Str(status) + vbCrLf + solo.lastResponse


    End If
Please see the example code in the supplied eigenvectortools\VBExample\source\frmTCPTest.frm
End If
</pre>


====Visual Basic with ET.NET====
===Visual Basic with ET.NET===


The above example will work on the ET.NET interface after two changes are made:
The above example will work on the ET.NET interface after two changes are made:
Line 188: Line 160:
         Set solo = New Eigenvector.application
         Set solo = New Eigenvector.application


After this, all other references to the "solo" object will be identical.
After this, all other references to the "solo" object will be identical.
 
===MSVC++ with ET.NET===
 
For applications using Microsoft's Visual C++ and using .NET, the previous example is almost identical to what would be used except for the following code changes:
 
Replace the line:
    EigenvectorToolsV6::application *solo = new EigenvectorToolsV6::application;
with
    Eigenvector::application *solo = new Eigenvector::application;
 
and the line
    solo->allowedLengthLong = &lngth;
with
    solo->allowedLength = &lngth;
 
See the example in the supplied eigenvectortools\CppExample\source\socketTester\socketTester.cpp, or
 
In addition, to instance the ET.NET object, you must add a reference to the EigenvectorTools object in your project in Visual Studio.


==Troubleshooting==
==Troubleshooting==
Line 233: Line 223:


* Check the system path for the binary directory. The exact location of the binary directory depends on the location of installation. The easiest way to locate this path is to find any of the shortcuts created by the installer and retrieve the properties of that shortcut. It will contain the full path to either a win32 or win64 directory. This is the folder which must be put onto the system path. Typical directories are:
* Check the system path for the binary directory. The exact location of the binary directory depends on the location of installation. The easiest way to locate this path is to find any of the shortcuts created by the installer and retrieve the properties of that shortcut. It will contain the full path to either a win32 or win64 directory. This is the folder which must be put onto the system path. Typical directories are:
   C:\Program Files\EVRI\''(product name)''\application\app_bin\win32   (32-bit Solo 6.2 and earlier)
 
   C:\Program Files\EVRI\''(product name)''\application\runtime\win32   (32-bit Solo 6.3 and later)
   C:\Program Files\EVRI\''(product name)''\application\runtime\win32         (32-bit Solo on a 32-bit system)
   C:\Program Files\EVRI\''(product name)''\application\runtime\win64   (all 64-bit Versions)
   C:\Program Files (x86)\EVRI\''(product name)''\application\runtime\win32   (32-bit Solo on a 64-bit system)
   C:\Program Files\EVRI\''(product name)''\application\runtime\win64         (all 64-bit Versions)


* The second possible cause of this error is attempting to start a 64-bit version of Solo or Solo_Predictor from ETV6. Only ET.NET can be used to start the 64-bit version of Solo. For more information, see [[EigenvectorTools#Introduction|Introduction to Eigenvector Tools]]. Check which version of Solo you are using
* The second possible cause of this error is attempting to start a 64-bit version of Solo or Solo_Predictor from ETV6. Only ET.NET can be used to start the 64-bit version of Solo. For more information, see [[EigenvectorTools#Introduction|Introduction to Eigenvector Tools]]. Check which version of Solo you are using and confirm that you are using the compatible EigenvectorTools version (ETV6 or ET.NET).


===Solo_Predictor Throws: unknown error Error in => opentoolbox.m at 117===
===Solo_Predictor Throws: unknown error Error in => opentoolbox.m at 117===
Line 244: Line 235:


Also make sure the license code is correctly entered into the default.xml file as described in [[Solo_Predictor_Installation_and_Configuration#License_Code|the Solo_Predictor Configuration page]].
Also make sure the license code is correctly entered into the default.xml file as described in [[Solo_Predictor_Installation_and_Configuration#License_Code|the Solo_Predictor Configuration page]].
===Setting Up Visual Studio 2019 for Examples===
Assuming you have installed Solo_Predictor following its installation instructions, for example at: C:\Program Files\EVRI\Solo_Predictor\ (and have edited the default.xml configuration file to include your license code) then you can test communication with Solo_Predictor from .NET languages as shown in the eigenvectortools\CSharpExample\CSharpExample.sin Visual Studio example included with Solo_Predictor and Solo.
====C#====
* Open the CSharpExample.sln file with Visual Studio and allow the "upgrade" to take place.
* In the References, remove the existing reference to EigenvectorTools.dll.
* Add a new reference to EigenvectorTools.dll in the SoloP folder (example - C:\Program Files\EVRI\Solo_Predictor\eigenvectortools\bin\x64\EigenvectorTools.dll).
* Run configuration as "Any CPU"
In the Visual Studio "Solutions Explorer" window open the "TestApp.cs" file by double-clicking. Ensure line 25 of this file is identifying your Solo_Predictor's "default.xml" settings file location. Run this test program to see it create an application object then use the EigenvectorTools methods "startApp()" and "sendCommand()" to start Solo_Predictor and send a simple example command message to it. It this is successful it reads the response "solo.lastResponse", or reports any error. If all goes well you should see a console window open containing something like the following:
    Starting Application...
    Status: 0
    Error Code: 0
    0.814723686393 0.905791937076 0.126986816294 0.913375856139 0.632359246225
   
    Press Enter to end this program.
This is the response to the simple command included in the code as
    "string cmd = ":plain; x='[rand(1,5)]'; x";"
but in practice you would send commands as described at:
[https://www.wiki.eigenvector.com/index.php?title=Solo_Predictor_Script_Construction Script Construction]
See the example at: [https://www.wiki.eigenvector.com/index.php?title=Solo_Predictor_Script_Construction#Reading_data_and_model_from_file_and_retrieve_results Retrieve Results]. This example would be coded as a command as:
    string cmd = ":plain; data = 'C:/datacollector/datafolder/spectrum1.spc'; model = 'C:/modelfolder/mymodel.mat'; pred = data | model; pred.prediction;".
For more complicated examples it can be simpler to use the ":include" command as described at [https://www.wiki.eigenvector.com/index.php?title=Solo_Predictor_Script_Construction#Other_Commands Other Commands].
==Release Notes==
The following pages describe the release notes for the given version of the EigenvectorTools application:
*[[Release_Notes_EigenvectorTools_2_3|Version 2.3]] - released Jan. 2014 / 2.3.1 Jul. 2014
*[[Release_Notes_EigenvectorTools_2_2|Version 2.2]] - released Oct. 2011

Latest revision as of 09:51, 30 November 2021

Introduction

NOTE: As of November 2021 (Solo 9.0) EigenvectorTools is transitioning to our Software_Development_Kit_(SDK). Current versions of Solo and Solo+MIA don't include EigenvectorTools, versions including EigenvectorTools are available by special request. Solo_Predictor does include EigenvectorTools but will transition in near future.


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 ("ETV6") written for best compatibility with older applications and those not wishing to run with Microsoft's .NET Framework. See the note below regarding limitations when using ETV6 on 64-bit operating systems. IMPORTANT: ETV6 has been removed in newer versions. ETV6 is only available for use in Solo_Predictor versions 3.6.2 and earlier. (32-bit versions only)
  • 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 (Visual Studio 2003, 2005, or later). 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.

Notes for use on 64-bit systems: If you need to use the ETV6 interface on a 64-bit system (for use with an older application, for example), it can only be used with older 32-bit versions of Eigenvector's products. To use this interface with our 64-bit products, you must use the ET.NET version of the interface. Furthermore, a 32-bit and 64-bit version of ET.NET is provided in the distribution. In general, the version used should be matched to the user's calling application (a 64-bit application should use the 64-bit ET.NET; a 32-bit application should use the 32-bit ET.NET). A compatibility table is given below.

Solo/Solo_Predictor Solo/Solo_Predictor
32-bit 64-bit
32-bit Windows ETV6 or ET.NET n/a
64-bit Windows ETV6 or ET.NET* ET.NET*

* Either the 32-bit or 64-bit version of ET.NET can be used, but should be matched to the application instancing ET.NET

Installation

  1. Download the version of Solo, Solo_Predictor or other stand-alone application which will be controlled by EigenvectorTools from your account at [http://download.eigenvector.com]
  2. Run the stand-alone application installer downloaded in the previous step. NOTE: This installation will include the option to add the product to the Windows system path. This step must be completed for EigenvectorTools to function. If the option is not available or not selected, please see the troubleshooting section. If multiple Eigenvector applications are installed on the same system, only the first one on the system path will be accessible through the EigenvectorTools interface.
  3. The EigenvectorTools application will be installed along with the stand-alone application and will be found in a folder named "eigenvectortools" under the main application folder. The DLLs referred to below will be in the eigenvectortools/bin/x86 folder for 32-bit versions of ET and the eigenvectortools/bin/x64 folder for 64-bit versions of ET. Note that all types of ET tools are shipped with all products, whether or not the main product is the 32- or 64-bit version.
  4. Using an account with administrative privileges, complete one of the two following steps depending on the version of EigenvectorTools you are installing:
    • EigenvectorTools: In the folder containing the EigenvectorTools application, drag the EigenvectorTools.dll to the regasm.exe application. Then copy the EigenvectorTools.dll into a folder on your system path (such as the Solo or Solo_Predictor folder on your path) or into the folder in which the 3rd party application resides. See the Troubleshooting section below.

The EigenvectorTools application should now be ready for use. It can be tested by running one of the test applications:

  • CPPExample/socketTester.exe to test EigenvectorTools only (not EigenvectorToolsV6) - Before running, copy the EigenvectorTools.dll into the CppExample folder.
  • VBExample/VBsocketTester.exe to test EigenvectorTools or EigenvectorToolsV6.

Please see Troubleshooting section for assistance with installation and testing errors.

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. For ET.NET, the base object is instanced by creating a new Eigenvector.application object. Note that the ET.NET version also has two other objects (socketClient and numericParser) which can be instanced using the same namespace (Eigenvector.socketClient and Eigenvector.numericParser).

Methods

startApp()

Start up the Solo application. This method should be called after setting any of the desired startup properties listed below and before issuing any sendCommand() calls. Once started, none of the startup properties can be changed.

RETURNS: 0 if start was successful or -1 if the start failed. Error messages from a failed start can be retrieved from the read-only property lastResponse.

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 is the standard way of communicating with the application. The 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

General Properties

lastResponse

READ ONLY: Returns the string response returned by the server after the last startApp() or sendCommand() call.

allowedLength
allowedLengthLong

Maximum string length allowed to be returned in lastResponse. In ET.NET: allowedLength property is a Long integer type and allowedLengthLong is not available. Both set the maximum length of string returned, but allowedLength property is typed as a Short Integer while the allowedLengthLong property is typed a Long Integer. In general, allowedLenghtLong should be used in ETV6 but allowedLength is supported to allow backwards compatibility. Maximum length of string when setting using the Short Integer version of this property is 65535 characters.

Start-up Properties - All Products

debug
debugMode

Boolean flag indicating if additional startup output should be given. Usually, this output will be written to a file named solo_debug.log in the user's temp directory.

Note: In EigenvectorToolsV6, this property is named debugMode to avoid namespace conflicts.

licensecode

String indicating the activation / license code to use with the application. Any previous code will be erased before using this code. If this code is not valid for the given version and product, the application will fail to start.

Note: for Solo_Predictor and other products that require a default.xml file, this property will not be used unless a valid default.xml has been found (see settingsFile property for a method to specify the location of this file). However, the default.xml file does not need to have a valid licensecode in it if this property is set. This is not the case for Solo or Solo+MIA which do not require a default.xml file.

settingsFile

String indicating an alternative settingsFile to load (instead of the default: default.xml). Also allows specifying location of default.xml when it can't be found automatically by the application.

Note: In Solo and Solo+MIA, the contents of specified file will only be used when an existing setting is not currently specified. Thus, this setting should be used in conjunction with clearSettings property to assure these settings are used.

addCmd

String specifying any additional command-line options to pass into the application.

Start-up Properties - Solo & Solo+MIA Only

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).

socket

Boolean flag indicating if socket connections should be enabled when automation mode is on (see automation property).

If false, only commands issued directly through application.sendCommand method will be allowed. If true, socket connections from other programs and optionally other computers will be allowed.

gui

Boolean flag indicating if any GUIs should be permitted. If false, application will exit after issuing any other command-line calls.

clearSettings

Boolean flag indicating if the settings file (default.xml or value in settingsFile property) should be re-read. If true, previously saved settings and preferences will be cleared before re-reading settings file. Solo_Predictor never retains settings from session to session.

dataFile

String specifying a data file to read in upon initialization of application. This file will be read into the workspace unless a special importer is designated for the file (this is only the case for custom applications)

 

Examples

Visual Basic with ETV6

Please see the example code in the supplied eigenvectortools\VBExample\source\frmTCPTest.frm

Visual Basic with ET.NET

The above example will work on the ET.NET interface after two changes are made:

  1. You must tell Visual Studio to reference the EigenvectorTools.dll (ET.NET) by selecting "add a reference" option in Visual Studio, then browsing to locate the EigenvectorTools.dll.
  2. You must make a change in the name used to instance the "solo" object. The exact name change depends on the version of Visual Studio you are using.
Visual Studio 6: Change the first two lines of code shown above to read:
       Dim solo As EigenvectorTools.application
       Set solo = New EigenvectorTools.application
Visual Studio 2003 and later: Change the first two lines of code shown above to read:
       Dim solo As Eigenvector.application
       Set solo = New Eigenvector.application

After this, all other references to the "solo" object will be identical.

MSVC++ with ET.NET

For applications using Microsoft's Visual C++ and using .NET, the previous example is almost identical to what would be used except for the following code changes:

Replace the line:

   EigenvectorToolsV6::application *solo = new EigenvectorToolsV6::application;

with

   Eigenvector::application *solo = new Eigenvector::application;

and the line

   solo->allowedLengthLong = &lngth;

with

   solo->allowedLength = &lngth;

See the example in the supplied eigenvectortools\CppExample\source\socketTester\socketTester.cpp, or

In addition, to instance the ET.NET object, you must add a reference to the EigenvectorTools object in your project in Visual Studio.

Troubleshooting

Dragging EigenvectorTools.dll to RegAsm doesn't register application

If dragging the EigenvectorTools.dll to the regasm application (to register the ET.NET object) doesn't make the application available, it is possible that the user with which you are trying to perform the action does not have sufficient permissions to register the application. Try using regasm from a command window (run: cmd). You will receive a message similar to:

RegAsm : error RA0000 : An error occurred while writing the registration information to the registry.
You must have administrative credentials to perform this task.
Contact your system administrator for assistance

You must either use an explicit administrator, or use the "Run as Administrator" option to start a command window (cmd.exe), navigate to the folder which contains EigenvectorTools.dll and use the command:

 regasm EigenvectorTools.dll


DllRegisterServer Failed. Return Code 0x80004005

If you receive the error:

DllRegisterServer in EigenvectorToolsV6.dll Failed. Return Code was: 0x80004005

when trying to use regsvr32 to register the ETV6 ActiveX, the user you are logged in as does not have sufficient permissions to register the application. You must either use an explicit administrator, or use the "Run as Administrator" option to start a command window (cmd.exe), navigate to the folder which contains EigenvectorToolsV6.dll and use the command:

 regsvr32 EigenvectorToolsV6.dll


Unhandled Exception: System.IO.FileNotFoundException

If you receive an error:

Unhandled Exception: System.IO.FileNotFoundException: File or assembly name EigenvectorTools, or one of its dependencies, was not found.
File name: "EigenvectorTools" at main()

the problem is most likely that the EigenvectorTools.dll is not in a folder on your system path or in the same folder as the 3rd party application.

It is often easiest to copy the EigenvectorTools.dll into the Solo or Solo_Predictor application folder. To locate this folder, open a DOS Command window and type the command path. Look in the displayed path for the folder relating to Solo, for example:

 C:\Program Files\EVRI\Solo\application\app_bin\win32\

An alternative solution to this problem is to install EigenvectorTools.dll in the GAC (Global Assembly Cache). For more information, see Microsoft Global Assembly Cache page


Cannot Find "plstoolbox.dll" or "System.DllNotFoundException" when Starting Solo

If EigenvectorTools are found and the objects are instanced correctly, but when you attempt to start the application (Solo or Solo_Predictor) via the startApp call, you receive either a message that:

  • "plstoolbox.dll" could not be found (from ETV6) or
  • "System.DllNotFoundException" (from ET.NET),

the likely cause is either that the Solo or Solo_Predictor application's binary directory is not on the system path or you are attempting to start the 64-bit version of Solo/Solo_Predictor using ETV6.

  • Check the system path for the binary directory. The exact location of the binary directory depends on the location of installation. The easiest way to locate this path is to find any of the shortcuts created by the installer and retrieve the properties of that shortcut. It will contain the full path to either a win32 or win64 directory. This is the folder which must be put onto the system path. Typical directories are:
 C:\Program Files\EVRI\(product name)\application\runtime\win32          (32-bit Solo on a 32-bit system)
 C:\Program Files (x86)\EVRI\(product name)\application\runtime\win32    (32-bit Solo on a 64-bit system)
 C:\Program Files\EVRI\(product name)\application\runtime\win64          (all 64-bit Versions)
  • The second possible cause of this error is attempting to start a 64-bit version of Solo or Solo_Predictor from ETV6. Only ET.NET can be used to start the 64-bit version of Solo. For more information, see Introduction to Eigenvector Tools. Check which version of Solo you are using and confirm that you are using the compatible EigenvectorTools version (ETV6 or ET.NET).

Solo_Predictor Throws: unknown error Error in => opentoolbox.m at 117

If you are attempting to use Solo_Predictor through the EigenvectorTools interface and it either refuses to start (returning an "unknown error Error in => opentoolbox.m at 117") or requests a license code via a dialog box, it is probable that the default.xml file cannot be found. When starting Solo_Predictor from another application, it is not always clear which folder the default.xml file should be located in so best practice is to use the "settingsFile" property of the EigenvectorTools object to specify where the default.xml file is located. The file can be a copy of the default.xml file usually located in the main Solo_Predictor program folder and can be stored in your own application's folder.

Also make sure the license code is correctly entered into the default.xml file as described in the Solo_Predictor Configuration page.

Setting Up Visual Studio 2019 for Examples

Assuming you have installed Solo_Predictor following its installation instructions, for example at: C:\Program Files\EVRI\Solo_Predictor\ (and have edited the default.xml configuration file to include your license code) then you can test communication with Solo_Predictor from .NET languages as shown in the eigenvectortools\CSharpExample\CSharpExample.sin Visual Studio example included with Solo_Predictor and Solo.

C#

  • Open the CSharpExample.sln file with Visual Studio and allow the "upgrade" to take place.
  • In the References, remove the existing reference to EigenvectorTools.dll.
  • Add a new reference to EigenvectorTools.dll in the SoloP folder (example - C:\Program Files\EVRI\Solo_Predictor\eigenvectortools\bin\x64\EigenvectorTools.dll).
  • Run configuration as "Any CPU"

In the Visual Studio "Solutions Explorer" window open the "TestApp.cs" file by double-clicking. Ensure line 25 of this file is identifying your Solo_Predictor's "default.xml" settings file location. Run this test program to see it create an application object then use the EigenvectorTools methods "startApp()" and "sendCommand()" to start Solo_Predictor and send a simple example command message to it. It this is successful it reads the response "solo.lastResponse", or reports any error. If all goes well you should see a console window open containing something like the following:

   Starting Application...
   Status: 0
   Error Code: 0
   0.814723686393 0.905791937076 0.126986816294 0.913375856139 0.632359246225
   
   Press Enter to end this program.

This is the response to the simple command included in the code as

   "string cmd = ":plain; x='[rand(1,5)]'; x";" 

but in practice you would send commands as described at: Script Construction See the example at: Retrieve Results. This example would be coded as a command as:

   string cmd = ":plain; data = 'C:/datacollector/datafolder/spectrum1.spc'; model = 'C:/modelfolder/mymodel.mat'; pred = data | model; pred.prediction;". 

For more complicated examples it can be simpler to use the ":include" command as described at Other Commands.

Release Notes

The following pages describe the release notes for the given version of the EigenvectorTools application: