VsCode for pyRevit and revit api

Hi everybody
This is my first post in this forum. I’m new in developing on pyRevit and python and I’m falling in love.
I’m wondering if there is a tuto or a step by step to set VsCode or maybe visual studio 2019 to comply all needs for a new développer; auto completion -help and intellisense for pyRevit api, revit api and stubs cpython-ironpython ?
It can help all noobs like me

Hi @A.Chak,
and welcome.
for the VScode setup, check out this post IntelliSense for pyrevit module
and some of the great work from Gui Talarico about stubs https://github.com/gtalarico?tab=repositories

3 Likes

Thank you so much Jean-Marc for your prompt reply. I am taking a look to your links and I will try to implement.

1 Like

Thank you again, I succeded to set it up
and what about Autodesk Revit API ?

Glad that helped,

It should do the trick with stubs only, read the docs here https://github.com/gtalarico/ironpython-stubs

those are threads examples on how to set that up but there are a ton on dynamo forum posts, some on stackoverflow, …



image

Read the disclaimer on the iron python stubs github, it mentions it can be slow to grab the auto-complete.

with a gif from Gui Talarico

In one of my setup, I had trouble to make it work due to pylance in vscode. If you happen to have pylance installed, add the extrapath within pylance setup options in vscode

2 Likes

Got it.
In fact as you said it was Pylance making the autocomplete not working as it should be.
All is fine now thank you so much