Scilab IDE alternatives; code folding

Hello, is there an alternative IDE available for Scilab? If you’re accustomed to features like code folding and auto-fill, the Scilab Editor is not very comfortable.

Thx, Smarty

Hello,

You should be able to use VSCode:

S.

Hello,

The continuation dots ... are not automatic, you have to type them yourself. If you have a lot of function definitions you can gather them in a dedicated script e.g. functions.sce and load them with exec("functions.sce",-1) at the begining of your main applications script. You can also build a library of functions (see Scilab Online Help).

In any case, someone is looking for the Ubuntu Linux solution to

{
     // run Scilab with graphic Functions
    "code-runner.executorMap": {
        "scilab": "cd $dir && /home/smartie/Tools/scilab-2024.0.0/bin/scilab-cli -nb -f $fileName",
    },
}

Subject: Need Help with Running Scilab Scripts in Visual Studio Code on Ubuntu

Hello everyone,

I’m encountering an issue while trying to run Scilab scripts using the Code Runner extension in Visual Studio Code on my Ubuntu system. I have successfully configured Scilab in VS Code, but I’m facing a problem when I attempt to run a script more than once.

Issue Description:

When I run a Scilab script for the first time in a VS Code session, it executes as expected. However, if I try to run the script again, I receive the following error message in the Terminal window:

bashCopy code

--> cd "/home/smartie/Dokumente/" && /home/smartie/Tools/scilab-2024.0.0/bin/scilab-cli -nb -f scilab.sce 
 
cd: Wrong number of input argument(s): 0 to 1 expected.

It seems like the cd command is being interpreted by Scilab instead of the shell, causing this error.

Current Configuration in settings.json:

I have the following executorMap configuration for Scilab in my settings.json:

jsonCopy code

"code-runner.executorMap": {
    "scilab": "cd $dir && /home/smartie/Tools/scilab-2024.0.0/bin/scilab-cli -nb -f $fileName",
}

Attempted Solutions:

I haven’t found a way to ensure that the cd command executes in the shell and not in Scilab within the context of Code Runner’s configuration.

Request for Assistance:

I would greatly appreciate any insights or solutions on how to correctly configure VS Code to run Scilab scripts multiple times in a session without encountering this error. Specifically, I’m looking for a way to ensure that directory changes are handled by the shell before Scilab executes the script.

Thank you in advance for your help and suggestions!

Ubuntu Linux version: -quit is important in case you want to rerun the *sce file

{
// run Scilab with graphic Functions
“code-runner.executorMap”: {
“scilab”: “cd $dir && /home/Tools/scilab-2024.0.0/bin/scilab-cli -nb -quit -f $fileName”,
},
}

Is it possible to create plots in vscode usin scilab?

  1. Wscilex-cli: in this mode, Scilab is started as command line with advanced features still available (graphics, export, xcos, scinotes, help browser, …).

Hello everyone,

I’m currently trying to run a simple Scilab script for plotting a sine wave on my Ubuntu system, but I’m encountering an issue when executing the script through the terminal. My ultimate goal is to integrate Scilab with Visual Studio Code (VSCode) instead of using the Scilab IDE.

Here’s the Scilab script (plotExample.sce) I am trying to run:

scilabCopy code

x = -10:0.1:10;
y = sin(x);
plot(x, y);
xlabel('X-axis');
ylabel('Y-axis');
title('Sine Wave');

When I run this script using the following command in the terminal:

bashCopy code

smartie@CLAGE-E-22-ubuntu:~/Documents/scilab$ /home/smartie/Tools/scilab-2024.0.0/bin/scilab-cli -f plotExample.sce

I receive this output, along with an error:

scssCopy code

Scilab 2024.0.0 (Oct 24 2023, 13:02:52)

[... Scilab startup messages ...]

at line     3 of executed file /home/smartie/Documents/scilab/plotExample.sce

Undefined variable: plot

--> 

I’m puzzled because plot is a basic function in Scilab, and I’m not sure why it’s being reported as undefined. I suspect the issue might be related to using scilab-cli, which perhaps doesn’t support graphical functions like plot.

Additionally, I’m keen on setting up Scilab to work within the VSCode environment to leverage its features and streamline my workflow. If anyone has experience with running Scilab scripts, especially involving plots, through VSCode on Ubuntu, your guidance would be greatly appreciated.

Thank you in advance for any insights or suggestions you might have!

To summarize what I’m looking for: I’m interested in utilizing Scilab within Visual Studio Code as I find its integrated development environment superior. Can I also generate plots in this setup? I’m aware that the Scilab_client is necessary for this, but can it be used to create plots as well?

I solved it… i need more experience with scilab

I have to use scilab-adv-cli

Thank you all

1 Like

unfortunately I receive following error message by vs code. Does anyone have experience with it?

OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "org.scilab.modules.jvm.ScilabClassLoader"). To use archived non-system classes, this property must not be set
/snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /home/gunnar/snap/code/common/.cache/gio-modules/libgiolibproxy.so

Is it possible to see the variables created by scilab in VScode?

Hello

Similar issue but for MACBOOK M1?

I have another problem in Windows about the gap in “Program Files”

there was some fix but i dont remember anymore.

M.f.G. Pascal

1 Like