Home > WheelTool > Automation

Controlling WheelToolTM from Different Software Environments

Class WheelToolCmd is declared in WheelTool.exe as GlobalMultiUse. It has one method, Exec, which is set as default. The method accepts a string with command (or sequence of commands, separated by ";") and returns the string with result (or sequence of results, separated by ";"). In general, the syntax (in Visual Basic) to execute a command is:

<result_string> = WheelToolCmd(<command_string>)

Visual Basic through ActiveX

Dim command as String, result as String
'FORM OR INPUT COMMAND STRING
'EXECUTE COMMAND
result = WheelToolCmd(command)
'ANALYZE RESULT STRING

There is no need to declare the class and to create an instance of this class, since it is GlobalMultiUse. There is no need to define method, since it is default.

ImagePro Basic and Aphelion Basic through ActiveX

Internal macro languages of ImagePro and Aphelion are flavors of MS Visual Basic. Important for us is that WheelTool must be declared, and an instance of it must be created. Following is the text that works for both packages.

Dim command As string, result As string
Dim WTool As Object
Set WTool = CreateObject("WheelTool.WheelToolCmd")
...
'FORM OR INPUT COMMAND STRING command
'EXECUTE COMMAND
result = WTool(command)
'ANALYZE RESULT STRING result
..
Set WTool = Nothing

MATLAB through ActiveX

WTool = actxserver('WheelTool.WheelToolCmd');
...
%FORM OR INPUT COMMAND STRING command
%EXECUTE COMMAND
result = invoke(WTool, 'Exec', command);  % E.g. res = invoke(LTool, 'Exec', 'F 7');
%ANALYZE RESULT STRING result
...
delete(WTool);

Home > WheelTool > Automation