-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Revit Methods in VS Code and missing Revit Services and Transactions #29
Comments
This is a stub problem. To make it work, you need to go into the code of the stubs, in this case, in the |
Hi Pavel, thanks for the help. I tried going over to FilteredElementCollector.py in stubs.min and changed the .WherePasses method to return self but doesn't work. However I noticed a new problem and that there are codes in each of the python files that are missing, see below. This problem also persists in a lot of the other python codes in the stubs.min file. Is this because I downloaded the wrong stub.min file? I actually just downloaded the entire folder in this github page and used what's there. Thanks again |
I don't even know how else to help. Try these stubs, I generated them not so long ago and it seems that in our community they all work with Pylance. |
Hi Pavel, It finally works, thank you! So it was the stubs after all. If you don't mind, can I ask how you generated the stubs yourself? or perhaps a reference guide that I can read? Also I noticed that the stub file you sent were divided into sub-folders having different years, are these Revit versions? or are these when the stubs were generated? Thanks again! |
I reworked the gtalarico project a bit, but for the most part the essence remains the same. |
Thanks Pavel. Apologies it took me a while to get back to you. Appreciate the help! |
Leaving this for others that may find it useful, I have made a script to fix typing issues, see here: #35 |
Hi!
I have installed the iron stubs against Python v2.7.18 and have edited the settings.json file of Pylance to include extra paths as instructed with linting disabled.
I have intellisense for the basic imports and a few first level codes such as FilteredElementCollector, however, when I do FilteredElementCollector(doc). - after the "." nothing comes out. This is also the same for element.Category for example, nothing comes out as well.
I'd like to ask if this is the case or is there an error somewhere in my set up.
Appreciate the help. Thanks! :D
The text was updated successfully, but these errors were encountered: