I was asked to come out a solution to integrate VEE into a .NET based test sequencer. The problem was we have a bunch of codes written in VEE, but our clients are using a .NET based test sequencer. Until VEE 8.0, I dont see any example given to use callable VEE in any .NET languague. It is not hard to write one though as we can always refer to the examples given
Below are the steps:
1. Instantiate an object from Callable VEE class
2. Load the file into the library
3. Call the user functions
Few things to take notes are:
1. I remember for different version of VEE, the callable VEE's namespace has been change.
2. Callable VEE does not support loading embedded IO configuration. That means it will only uses the global IO configuration file.
3. Conversion of input and output parameters.
Below is one of the code example on how to VEE from C#:
AgilentCallableVEELib.CallServerClass VLoader = new AgilentCallableVEELib.CallServerClass();
AgilentCallableVEELib.Library VLib1 = null;
AgilentCallableVEELib.Library VLib2 = null;
VLib1 = VLoader.Libraries.Load(@"C:\Documents and Settings\vee\Desktop\TE VEE\VEElib.vee");
VLib2 = VLoader.Libraries.Load(@"C:\Documents and Settings\vee\Desktop\TE VEE\VEElib1.vee");
object obj1 = Missing.Value;
object[] objArray1 = new object[1];
object obj2 = objArray1;
VLib1.UserFunctions["function_1"].Call(obj1, ref obj2);
objArray1 = (object[])obj2;
MessageBox.Show(objArray1[0].ToString());
VLib2.UserFunctions["function_1"].Call(obj1,ref obj2);
objArray1 = (object[])obj2;
MessageBox.Show(objArray1[0].ToString());
Download the sample code
Wednesday, July 16, 2008
Calling VEE (Callable VEE) from .NET
Labels:
.NET,
Programming,
VEE
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment