AnsweredAssumed Answered

Calling a Callable VEE server function from within VEE

Question asked by daras Employee on Sep 3, 2010
Latest reply on Sep 7, 2010 by daras
I am trying to create a Callable VEE client using VEE and things are just peachy when it comes to getting a CallServer handle, loading the other VEE library, getting the list of user functions in the loaded library and even getting the name, type, and the number of arguments each function takes.  Where I am running into a dead end is actually calling one of the user functions. According to the help the Call method has the following syntax and requirements:


UserFunction.Call [ Inputs ] [ , Outputs ]  or,

Main.Call [ Inputs ] [ , Outputs ]

Part Description

Inputs A Variant array. Must have one element for each input pin of the function being called.

Outputs A Variant array.

in my program I am trying to call a function that has a single input pin set to scalar text and one output pin that outputs a scalar text result.  also in my program the handle to the user function I want to call is ufunc and I have the following code in an equation object:

input = ["ABCD"];
input = asVariant(input);
output = input;
ufunc.Call(input, ByRef output);

when I execute this code, I get the following error:

ActiveX object: "VEE" returned error code: 0x8004039d (925)
ActiveX object returned error message: Value must be a 1 dimensional VARIANT array
"Inputs" parameter of function "TestStringInput"
VEE Error number: 413

when I look at the input and output containers they are both typed as VARIANT and have dimension of 1.  So the question is this: is it possible to use callable vee from within vee and if so does anyone have any examples?  The help ironically enough only provides examples of other languages using the callable vee server