Rhinoscriptsyntax on Visual Studio Code

Hi all, I would like to ask if rhinoscriptsyntax were possible imported it on visual studio code. I am using Rhino 8 with the RhinoCode extension and the script runs well. However, on VS Code I get the import underlined. Is there a way to solve it? Thank you in advance

You need thr stub files. Check this post

I solve it! Thank you so much.

1 Like

Hello, I don’t know why but before I have the site-stubs components inside the folder on this path .rhinocode\py39-rh8\site-stubs when I uploaded them on VS code the folder became empty. How could I install again the site-stubs? Thank you

Open ScriptEditor in Rhino and it will recreate the stubs


Hi @eirannejad

I just added the stubs from site-stubs to vsCode.
I really appreciate that this is possible. However, I get a couple of type errors in my code.

Is the issue with Pylance or the generated stubs?

from Rhino import RhinoDoc
doc: RhinoDoc = RhinoDoc.ActiveDoc
from Rhino import FileIO

opt = FileIO.FileWriteOptions()
opt.SuppressDialogBoxes = True

Hello, I’ve been a 3D modeler on Rhino for some time now, self-taught in Python for a few years(thanks to @Helvetosaur and @dale , and all of the other person who takes time for me!). I’ve been developing my professional tools in Python on Rhino’s IDE, but I’d like to transition to coding on VS Code for version 8. I’ve also developed a project management tool that uses pandas, psycopg2 for the database part, openpyxl, and customtkinter for the graphical part, all of which work well on VS Code. That’s why I’d like to continue with VS Code. I’ve found the script-sync tool, which seems interesting for developing on VS Code while checking on Rhino simultaneously. However, I’m having trouble importing rhinoscriptsyntax on VS Code. I’ve searched the forum, but what I find is very technical, and my Python developer level is really limited on these topics. For example, I downloaded rhinoscriptsyntax from GitHub, extracted the folder into lib/site-packages in my env folder. Then I type my import rhinoscriptsyntax as rs at the top of the script, but it doesn’t work… Maybe I’m making it too complicated and should just work directly in the script editor in Rhino.

I’m not creating a new discussion because I feel that the title of this one corresponds exactly to my question, but I don’t understand the answer at all, mainly because my English, even with a translator, is poor, and also because there are development topics that I still don’t understand!


@onlyforpeace Make sure to add the location of where those packages are installed to vscode.