VSCode intelliSense for Revit
As most of you have probably got, the better achievements I have as a developer within Revit API are thanks to Python 🐍, so, I thought was nice to share with you the environment I set-up for myself in Visual Studio Code (Visual Studio Code - Code Editing. Redefined).
Many thanks to Gui Talarico that shared a fundamental repository for the arguments we are going to discuss today:
GitHub - gtalarico/ironpython-stubs: Autocomplete stubs for common IronPython/.NET libraries
side note: as suggested from Gui Talarico "stubs would technically need to be generated for each Revit API version and they haven't in a while, so stubs might be a little stale."
In the below video I show a step by step, from zero to hero, setting up.
Here, in short, the list of what to do:
- Download the stumps from the above link
- If you didn't yet:
- Install Visual Studio Code
- Install Python extension for VSCode
- Edit the settings.json file of the Python extension
- Be sure that your python version is IronPython.
- Be sure to have the stubs path between the extra-paths.
- reload window in VSCode
- enjoy! ✨
I always like the videos, trustful and usually very explicative, however for the lazy-ones, you can't copy/nothing neither you can read with calm, unless you stop in the very right moment...
so I decided to share also how looks my current settings.json file:
1{ 2 "workbench.editorAssociations": { 3 "*.ipynb": "jupyter.notebook.ipynb" 4 }, 5 "python.pythonPath": "c:\\Program Files (x86)\\IronPython 2.7\\ipy64.exe", 6 "python.languageServer": "Microsoft", 7 "python.autoComplete.extraPaths": [ 8 "C:\\Users\\giuse\\AppData\\Roaming\\pyRevit-Master\\pyrevitlib", 9 "C:\\Users\\giuse\\AppData\\Roaming\\ironpython-stubs-master\\release\\stubs.min" 10 ], 11 "workbench.colorTheme": "Monokai" 12}
copied!
Quick and easy, but most of all I want to tell you that it's not a coincidence that in this post I mentioned #pyRevit , the plan is to start on this blog a new series on it, too good to not mention it, too powerful to not use or being amazed from!!!
Stay tuned,
Cheers!
New Comment
The e-mail is used to notify you any interaction with your comment