Hi everyone, I met the some question in GHpython. I am trying to import ghpythonlib.components in VScode, it works but cannot AutoComplete like rhinoscriptsyntax.
Any ideas?
Thanks
Hi everyone, I met the some question in GHpython. I am trying to import ghpythonlib.components in VScode, it works but cannot AutoComplete like rhinoscriptsyntax.
Any ideas?
Thanks
This is not going to work. ghpythonlib.components is dynamically generated based on what is available in Grasshopper.
Thanks steveļ¼When I use ghpythonlib.components in GHpython ļ¼it can Autocomplete GH components likeāAbsoluteāļ¼āAdditionāand"AdjustPlane" .How can I Achieve the same Autocomplete in VScodeļ¼
Thanks
GhPython can do this because it is the same process as Grasshopper and therefore can ask grasshopper about all of the components available. This is not available in VSCode. Someone would have to write a program to communicate between Rhino and VSCode or to generate a python stub file based on the components available on your computer.
Hi @WenjieHuang
you also emailed me in private. Steve is correct. There might be some way but it would involve knowing very well the VSCode code completion library, which I donāt.
Thanks,
Giulio
ā
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Thank you! This answer helped me a lot
@WenjieHuang well, Iām glad.
In cases such as the ones Steve mentions, Iāve seen this being done with .pyi files.
But Iām reading long discussions with those and VSCode, so I donāt know if this will be easy/a long rabbit hole or how it works. I cannot start this project at this point.
Thanks,
Giulio
ā
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com