I am thinking about writing the Grasshopper Python codes in Visual Studio or Visual Studio Code. Is there a way to do that?
I know you can have a connection between Rhino and Visual Studio Code but not with the Grasshopper Python per my knowledge. Please let me know if there is anyone who can shed some light on it. Would appreciate that. Thanks!
As far as I know, there is no good solution for this right now. What I sometimes do is reading code saved in external files using the “code” input of ghpython components. You don’t have any code completion then, but can use version controls systems and use editor features like code formatting then.
So you could develop in the gh component and then move to an external .py file.
Thank you for the relpy Martin. Let me try what you have just said but I am pretty I will struggle to figure that out as I never had the chance to explore this part. Hopefully will come across some other methods as well.
You can then import your module inside your ghPython script component and use it by just setting up some interfacing functions you prepare to feed in GH inputs etc. If you make changes to your module code and want to update / hotswap it once it has been loaded in your current Rhino session, you can use built in module reload function.