Rhino 8 Feature: ScriptEditor (CPython, CSharp)

Confirmed that RH-66399 (editor crashing on external file edit) was resolved

1 Like

excited for this new python version!
When i install numpy by pip i meet a basic problem (sorry i am not a computer expert). Even i add ‘…rhinocode\python3.9-1.11’ and ‘…rhinocode\python3.9-1.11\scripts’ into my PATH, it still returns pip and python are not there, so that i can’t install numpy. It seems it always recognize my pip from another folder belongs to anaconda.
I don’t know how to successfully install python3,pip,numpy into rhino script based on existing python from conda. Any simple solutions?

6 posts were split to a new topic: Updating Rhino 8 WIP

Release Notes (8.0.21348.8306)

  • Published RhinoCode CLI
  • Published RhinoCode for Visual Studio Code RH-66659
  • Major improvements on the inner-workings of the code editor. The is only one file now storing all code editor settings and states ~/.rhinocode/editor.json
  • Fixed RH-66388
  • Fixed RH-66394
  • Fixed RH-66399
  • Fixed RH-66461
4 Likes

Hello @eirannejad

In VSCode, the Run in Rhino WIP command produces nothing, just like “RhinoCode.exe list” command line
image

I am on Windows

Also I don’t understand the path "\\\\.\\pipe\\", it doesn’t seem to be a valid Windows path.

jmv

Do you plan any debugging tools, internal to RhinoCode or via an external editor ?


I am not a developer, I am a modeler, those before digital (it’s closer to the carpenter).
But today everything is digital, so I learned to adapt Rhino to my needs and I have a more successful version of my previous experimentation.
I’m happy, it works with Rhino7 and Rhino8.

My code is embedded in a library that I cannot share.
When I see your code and mine it doesn’t seem like we have the same approach,
but if it helps I can extract a small version of this plugin ?

What you take care of, I won’t have to do it anymore. :slight_smile:

1 Like

Of course

Ehsan is getting the foundation in place right now for just getting everything up and running

3 Likes

Do you have an instance of rhino running?

Yes, Rhino 8 was open

Same here, RhinoCode doesn’t detect Rhino Instances that are open.

@sridharbaldava @kitjmv Would you mind starting rhino, attempting to run script from vscode and then go back to the rhinocode editor in Rhino and Open the log viewer from the tools menu. I’d appreciate if you can DM me the full log contents

Hello @eirannejad
log.txt (11.7 KB)

there is also the path \\?\C:\Users\jmvre\.rhinocode\python3.9-1.11 which I do not understand

1 Like

\\?\ prepended to a path allows for path lengths beyond the 260 character limit normally in place.

See this document: Maximum Path Length Limitation - Win32 apps | Microsoft Docs

2 Likes

Ok great. Seem like Rhino is not receiving messages from rhinocode cli. Let’s open rhino again and then on command line run rhinocode list --verbose

C:\Program Files\Rhino 8 WIP\System>rhinocode list --verbose
Debug 16/12/2021 17:06:22 [rhinocode] Arguments: list;--verbose
       PID ID                             DOC                  PATH
Debug 16/12/2021 17:06:22 [rhinocode] Found pipe at \\.\pipe\rhinocode_remotepipe_8820
Debug 16/12/2021 17:06:22 [rhinocode] Connecting => rhinocode_remotepipe_8820
Error 16/12/2021 17:06:22 [rhinocode] Post error Impossible de charger le fichier ou l'assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ou une de ses dépendances. La définition trouvée du manifeste de l'assembly ne correspond pas à la référence de l'assembly. (Exception de HRESULT : 0x80131040)

For the last line

Could not load file or assembly  ... or some of its dependencies. The definition found from the assembly manifest does not match the assembly reference. 
1 Like

Do you have this dll in your Rhino WIP installation? C:\Program Files\Rhino 8 WIP\System\System.Runtime.CompilerServices.Unsafe.dll

Yes I have.
But maybe not the right version

1 Like

Ok. Unzip and drop this file where rhinocode.exe is:

RhinoCode.exe.config.zip (485 Bytes)

I missed including this in the Rhino WIP installer. This is the .exe.config file that directs the assembly loader to use the System.Runtime.CompilerServices.Unsafe installed with Rhino

2 Likes

He still doesn’t want to.
By following the same procedures
log.txt (11.8 KB)

C:\Program Files\Rhino 8 WIP\System>rhinocode list --verbose
Debug 16/12/2021 17:30:01 [rhinocode] Arguments: list;--verbose
       PID ID                             DOC                  PATH
Debug 16/12/2021 17:30:01 [rhinocode] Found pipe at \\.\pipe\rhinocode_remotepipe_1796
Debug 16/12/2021 17:30:01 [rhinocode] Connecting => rhinocode_remotepipe_1796
Debug 16/12/2021 17:30:02 [rhinocode] Request => {"$meta":{"version":"1.0"},"$type":"status"}
Debug 16/12/2021 17:30:02 [rhinocode] Response => {"pipeId":"rhinocode_remotepipe_1796","processId":1796,"processName":"Rhino","processVersion":"8.0.21348.12305","processAge":2,"activeDoc":{},"activeViewport":"Top","$meta":{"version":"1.0"},"$type":"status"}
      1796 rhinocode_remotepipe_1796