Joerg,
thanks for all the help; I managed to get it working...
The output must be a sequence of sequence, otherwise I get the #NAME error
as if the addin is not properly
loaded. My last problem was actually caused by not flagging the function as
an 'array' function.
Just reference, this is my IDL file:
interface Xcvxopt : com::sun::star::uno::XInterface
{
sequence < sequence <long> > lp( [in] sequence < sequence < long > >
c);
};
and this is my Python method:
def lp(self, c):
x = ((1,),(2,))
return x
I prefer to return the results in a column, but a row works also:
def lp(self, c):
x = (1,2),
return x
It would still be nice to be able to return multiple arguments (as you can
in, e.g., gnumeric). For example,
I would like to return both primal and dual variables for the optimization
variables, and a status
message about the solution (feasible, infeasible, unbounded, etc.) but I can
live with the
current solution.
- Joachim
On 5/20/07, Jörg Budischewski <[EMAIL PROTECTED]> wrote:
what I actually wonder about is that you choose a "matrix" signature,
but your sample only takes vectors, maybe change your addin to vectors
or your sample to matrixes, just to see, how it behaves.
But as I said, i dont know calc good enough.
Bye,
Joerg
Joachim Dahl wrote:
> thanks, this brought me a step further...
>
> Doing like Joerg suggest, at least I don't get the #NAME error.
>
> I invoke my add-in as
> =LP(A1:A2)
>
> but only a single element of the (1,2), array is returned (the first
> element).
>
> Joachim
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]