[Scilab-users] API Error
Paul Bignier
paul.bignier at scilab-enterprises.com
Wed Oct 5 17:07:09 CEST 2016
Hello Shamika,
Are you sure that 'c' is a mlist? When I try you code with
-->c=hypermat([2 3 2 2],1:24); callOct(c);
with a dummy callOct, I get an early error in getListItemNumber:
"API error: in getListItemNumber: Invalid argument type, list expected"
"This variable is not a list"
Now wen I try with
-->c=list(1,2,3); callOct(c);
I don't get an error.
Hope this helps,
Paul
On 10/05/2016 06:54 AM, Shamika Mohanan wrote:
> Hello,
>
> I'm using Scilab 5.5.0 API in c++ code. I have the following code-
>
> sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr);
> if(sciErr.iErr)
> {
> printError(&sciErr, 0);
> return 0
> }
>
> sciErr = getListItemNumber(pvApiCtx, piAddr, &noItemList);
> if(sciErr.iErr)
> {
> printError(&sciErr, 0);
> sciprint("This variable is not a list");
> return 0;
> }
> for( a= 1 ;a<=noItemList ; a++)
> {
> sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, a, &iRows, &iCols,
> &listItem);
> if(sciErr.iErr)
> {
> printError(&sciErr, 0);
> return 0;
> }
> }
>
> This is part of a larger function. For the function call
> d=callOct(c),where c is an mlist (3D matrix), I get the error
>
> API Error:
> in getMatrixOfDoubleInList: Unable to get address of item #2 in
> argument #1
> in getMatrixOfDouble: Invalid argument type, double matrix expected
>
> What am I doing wrong?
>
> Shamika
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
--
Paul BIGNIER
Development engineer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.68
http://www.scilab-enterprises.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161005/ee8a353d/attachment.htm>
More information about the users
mailing list