Problems with PyCharm as an External Code Editor

PyCharm does not know what RhinoCommon types are. For example your list contains Rhino.Geomery.Brep but PyCharm does not have a way of knowing the type members so it can autocomplete for you.

The way this is usually done is through “stub” files (.pyi file extension):

See here for how to use stubs in pycharm

If you are using Rhino 7, you can use this python package that contains stubs for RhinoCommon 7:

If you are using Rhino 8, launch Rhino and run the ScriptEditor command to open the editor. Python 3 inside of Rhino will start creating stub files and will place them under:

%HOMEPATH%\.rhinocode\py39-rh8\site-stubs

You can point PyCharm to this directory

4 Likes