Re: [Scilab-users] Windows 10 VS 2015 example under ilib_build fails pvApiCtx undeclared identifier

2020-05-11 Thread Fredrik Blomqvist
Hi Clement,

thanks for answering.

You are correct, the pvApiCtx global define available in Scilab 5 no more
> exists in Scilab 6 as described in [1] or [2]. The call_scilab might need
> to be updated to cover this change, could you please post a bug on that ?
>

Ah, yes I will, but at the moment I still don't know where the bug is
except it seems some documentation is missing (or it's a combination with
something I have misunderstood).

In a sentence, you should add a variable `void* pvApiCtx` on each gateway
> declaration. This variable will be passed through the Scilab APIs as a
> context of execution.
>

This I found in the documentation, so if I were doing a gateway, then I
don't think anything is really missing in the documentation. The problem is
I'm running Scilab from my C++ exe file (Scilab Engine instead of Gateway
if I understood the naming correctly). In short I did this from my program
(using Scilab 5.5.2):

   1. Start up the scilab instance: StartScilab()
   2. Call my script: SendScilabJob()
   3. Read back some variables after the script is done:
   readNamedMatrixOfDouble( pvApiCtx, ...)
   4. TerminateScilab()

But up until number 3 above, "pvApiCtx" wasn't needed. And I've read some
other discussion on this mailing list that you shouldn't mix the old 5.2
stack-style with the new 6.X C++ API style, but that feels exactly what I'm
doing!? So I'm guessing I'm actually reading back my variables wrong, but I
didn't find any documentation of another way to do it? Sending NULL on
pvApiCtx makes the program work (which I found in an example), but is it
really the right 6.X way to do it in?

Thanks for any hints
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Windows 10 VS 2015 example under ilib_build fails pvApiCtx undeclared identifier

2020-05-11 Thread Clément David
Hello,

You are correct, the pvApiCtx global define available in Scilab 5 no more 
exists in Scilab 6 as described in [1] or [2]. The call_scilab might need to be 
updated to cover this change, could you please post a bug on that ?

[1]: https://cgit.scilab.org/scilab/tree/scilab/CHANGES.md?id=6.0.2#n374
[2]: https://help.scilab.org/docs/6.1.0/en_US/integerExample.html

In a sentence, you should add a variable `void* pvApiCtx` on each gateway 
declaration. This variable will be passed through the Scilab APIs as a context 
of execution.

Thanks,

--
Clément

> -Original Message-
> From: users  On Behalf Of Freddos
> Sent: Friday, May 8, 2020 11:19 AM
> To: users@lists.scilab.org
> Subject: Re: [Scilab-users] Windows 10 VS 2015 example under ilib_build fails
> pvApiCtx undeclared identifier
>
> How did it go with this one? I just upgraded to Scilab 6.1 (from 5.5.2) and 
> got the
> "pvApiCtx: undeclared indentifier" using the "Scilab Engine"
> (calling Scilab from my C++ application). All upgrade documentation (5 to 6) I
> have found only talks about the API using Gateways (not Scilab Engine), and 
> the
> documentation for the call scilab api still has code examples with the 
> pvApiCtx
> variable ("Double management" for example). But looking in the scilab headers
> it seems to have been removed. So either how do I get the pvApiCtx variable 
> (?)
> or how is the right way to read variables from the Scilab Engine in Scilab 
> 6.x?
>
>
>
> --
> Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-
> f2602246.html
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] CsvRead function

2020-05-11 Thread Antoine Monmayrant

Hello Daniel,

It seems to me that the error is more the absence of the file 
"C:\Temp\PGC\Sai_Lot1v3.txt".


You can try to check just before line 206 whether the file is present or 
not:

ls("C:\Temp\PGC\Sai_Lot1v3.txt") or isfile("C:\Temp\PGC\Sai_Lot1v3.txt") .

Hope it helps,

Antoine


On 11/05/2020 11:45, Daniel Stringari wrote:

Dear colleagues,

I am using a code in the version of Scilab 6.1 that was made in version
Scilab 6.0.2. However, the same code that works in version 6.0.2, gives an
error when executed in version 6.1. The function pointed on the error screen
is always 'csvRead'.





any suggestion ?



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] CsvRead function

2020-05-11 Thread Stéphane Mottelet

Hi

Le 11/05/2020 à 11:45, Daniel Stringari a écrit :

Dear colleagues,

I am using a code in the version of Scilab 6.1 that was made in version
Scilab 6.0.2. However, the same code that works in version 6.0.2, gives an
error when executed in version 6.1. The function pointed on the error screen
is always 'csvRead'.





any suggestion ?


Yes. Are you sure your file exists (considering the error message) ?

S.





--
Sent from: 
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users


--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] CsvRead function

2020-05-11 Thread Daniel Stringari
Dear colleagues,

I am using a code in the version of Scilab 6.1 that was made in version
Scilab 6.0.2. However, the same code that works in version 6.0.2, gives an
error when executed in version 6.1. The function pointed on the error screen
is always 'csvRead'.

 

 

any suggestion ?



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users