Rhino 8 Feature: ScriptEditor (CPython, CSharp)

To me that looks like the DLL loaded now.

1 Like

This answer is correct. See the json response with information on the running instance of Rhino there? Try running from vscode again

I’m going to try again but:
in log.txt, line 117 ?

Unrelated

Ok I seem to have another bug in the vscode extension. Running the subprocess with spaces in the path C:\Program Files\Rhino 8 WIP\System is the bug

Just pushed an update for the vscode extension 0.0.3. That should fix the problem

3 Likes

VSCode extension return now:

[Extension Host] Error checking rhinocode path \RhinoCode.exe | Error: ENOENT: no such file or directory, stat '\RhinoCode.exe'

I solve this by specifying rhinocode.rhinoInstallPath in settings.json

{
    "rhinocode.rhinoInstallPath": "C:\\Program Files\\Rhino 8 WIP\\System"
}
1 Like

It’s strange. Previously, the extension seemed to put the correct path of “Program Files”
That said, it might be good to set a default value on rhinoPathConfig

let rhinoPathConfig = configs.get<string>("rhinoInstallPath", "");
if (rhinoPathConfig == "") {
    switch (os.platform()) {
    case 'darwin': rhinoPathConfig = ...; break;
    case 'win32' : rhinoPathConfig = "C:\\Program Files\\Rhino 8 WIP\\System" break;
    }
}

A post was split to a new topic: Better assets and improved rendering

Works on my end as well. Two things I did a) copy config file attached above, b) explicitly adding rhinocode.rhinoInstallPath to settings.

1 Like

Yeah that’s not a bug. I think I forgot to mention that in the video :man_facepalming:t2: RhinoCode extension has a bunch of settings

Sending a PR for that? Repo is here GitHub - mcneel/rhinocodevscode: rhinocodevscode

Great ! Yes ! (I was not sure you would accept the PR).
As soon as possible (and before next year).

What is the default path of “rhinoPathConfig” under MacOS ?

1 Like

/Applications/RhinoWIP.app

We also need to add a message there if the extension can not find rhinocode in any of the provided paths (the rhinoInstallPath accepts a ;-delimited list of paths)

done


Can you explain to me how you compile C# scripts?
Are these Roslyn scripts (like those with a “.csx” extension) or do you use custom transform so you can compile them as a standard assembly?

I would like to add OmniSharp support to have automatic completion (if possible).

1 Like

We are working on providing language support for Python and C#. Stay tuned. Thanks for the PR! :smiley:

1 Like

@kitjmv Merged your PR for review. I have a couple of questions posted here that’d be great to get your answers on (code divided into functions and improved errors by corbane · Pull Request #1 · mcneel/rhinocodevscode · GitHub)

1 Like

I’ve installed this extension for VS Code under Windows but… what do I do next? There is no “Run in Rhino Wip” option anywhere… Can you please provide SIMPLE step-by-step guide for noobs!

Hello @monkelisha

Start Rhino WIP
Start RhinoCode (this is optional, but if you’ve updated Rhino, or never started RhinoCode, you need to do so. If you don’t know, do so)

image

In VSCode

Of course, you must have a script file (* .py, * .cs) open.
press F1 (or View menu > Command palette)

image

find “Run in Rhino WIP”

that’s all

3 Likes

Thank you @kitjmv,
I had no idea about this “Command palette” option, so I was just at this chaotic clicking all over the VSC for couple hours without any success… and in a such hopelessness I even was on the verge of resorting to the tambourine-dance method.