[Scilab-users] Context error in Xcos Scilab 6.1.0

Perrichon perrichon.pierre at wanadoo.fr
Tue Mar 3 20:06:23 CET 2020


PS

I have full read/write rights on my machine

 

 

De : Perrichon <perrichon.pierre at wanadoo.fr> 
Envoyé : mardi 3 mars 2020 16:23
À : 'Users mailing list for Scilab' <users at lists.scilab.org>; 'Samuel Gougeon' <sgougeon at free.fr>
Objet : RE: [Scilab-users] Context error in Xcos Scilab 6.1.0

 

Hello Samuel :

 

1.	The correct pathname of script2var.sci is rather SCI/modules/scicos/macros/scicos_scicos
2.	If I launch your instructions with the correct directory, I get :

 

 

--> cd SCI/modules/scicos/macros/scicos_scicos

ans  =

 

  "C:\Program Files\scilab-6.1.0\modules\scicos\macros\scicos_scicos"

 

--> predef clear

 

--> genlib scicos_scicoslib

genlib : Impossible d'ouvrir le fichier "C:\Program Files\scilab-6.1.0\modules\scicos\macros\scicos_scicos\lib".

ans  =

 

  F

 

--> clear script2var

 

To read you

Best regards

 

 

De : users <users-bounces at lists.scilab.org <mailto:users-bounces at lists.scilab.org> > De la part de Samuel Gougeon
Envoyé : mardi 3 mars 2020 13:57
À : users at lists.scilab.org <mailto:users at lists.scilab.org> 
Objet : Re: [Scilab-users] Context error in Xcos Scilab 6.1.0

 

Le 02/03/2020 à 10:17, Clément David a écrit :

Hello Pierre, Samuel,
 
First, did you opened a bug on that issue?
 
Second, to me, the bug is located on the script2var() function which resolves the context and output a struct of `variable=value` that are defined for the diagram (and its parents). For example, when I explicitly define A=100 in the context, the A variable is found and resolved as 100 in the diagram. However, defining A=50 inside the A.ctx file and using the schema A610.zcos, where the A.ctx file is passed to exec(), failed.

 

Thanks Clément for the indication and the report <http://bugzilla.scilab.org/show_bug.cgi?id=16357> .

Pierre, 
A solution is available => there <https://codereview.scilab.org/cat/21429%2C2%2Cscilab/modules/scicos/macros/scicos_scicos/script2var.sci> .
How to install it:

*	Download and unzip the file. Rename it script2var.sci
*	Put script2var.sci in its SCI/scicos/macros/scicos_scicos directory
*	Run the following Scilab code in the console, with some full read/write rights:
cd SCI/scicos/macros/scicos_scicos
predef clear
genlib scicos_scicoslib
clear script2var

Then things should work for your session and any following ones.
If you get some error when running genlib(), it is most probably because you don't have enough rights to overwrite the library with its update.

BR
Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200303/7c51e8f2/attachment.htm>


More information about the users mailing list