How to set up Revit API Autocomplete in VS Code

Поділитися
Вставка
  • Опубліковано 28 січ 2025

КОМЕНТАРІ • 43

  • @ErikFrits
    @ErikFrits  Рік тому +1

    👇You can get Revit API Stubs from this Page:
    learnrevitapi.com/Free-Lessons/1-03_revit-api-autocomplete-in-vs-code
    👀Look in Download Section under the video!
    ⌨ Happy Coding!

    • @skuliarnarsson5184
      @skuliarnarsson5184 4 місяці тому +2

      unfortunately the link for the stubs leads to a 404 error page.

    • @CitizenChef
      @CitizenChef 4 місяці тому

      @@skuliarnarsson5184 @ErikFrits seconding this for visibility. I was able to follow this tutorial to get older versions of stubs working, but they're not quite as comprehensive. Would really appreciate if you're still able to make these available!

  • @fellipeserafimcaetano7543
    @fellipeserafimcaetano7543 Рік тому +2

    Works awesome! Thanks a lot for this tutorial Erik!

    • @ErikFrits
      @ErikFrits  Рік тому

      Glad It Worked.
      Happy Coding!

  • @15292823
    @15292823 Рік тому +2

    I love the video and your work is amazing Erik

    • @ErikFrits
      @ErikFrits  Рік тому

      Thank you!
      Stay around for more 😉

  • @gideonmuratha3703
    @gideonmuratha3703 Рік тому +2

    Thanks a lot Erik 🤝

  • @melanielavoie7787
    @melanielavoie7787 6 місяців тому +1

    @erikFrits
    Hi Erik, great video! I am stuck, please help!
    Once I get to the point at 3:30 in your video, I cannot seem to find this master library! There for my autocomplete is not working. Any suggestions please? Thank you!

    • @ErikFrits
      @ErikFrits  6 місяців тому

      Sometimes pyRevit-master is installed somewhere on C:drive or ProgrammFiles, I can't remember exactly.
      You can check where are the pyRevit tools located by using ALT+Click.
      Maybe that will help you locate the folder.
      Alternatively, I would suggest you to go to various drives and putting pyRevit-masters in the search. And let the PC look for it.

  • @art_forever_32
    @art_forever_32 2 місяці тому +1

    Awesome!

  • @amerhallaq1217
    @amerhallaq1217 14 днів тому

    Hi Erik, That's great!
    In my case, I have an issue with "python.analysis.extraPaths", it shows that it is an unknown configuration setting
    Any suggestions, please?

  • @AlvusxD
    @AlvusxD Рік тому +2

    Maybe you could help me, i have an issue with numpy library that it works fine outside pyrevit but when I try to import it with CPython in a pyrevit application it says that ''numpy: you should not try to import numpy from
    its source directory; please exit the numpy source tree, and relaunch
    your python intepreter from there.'' have you ever had this issue?

    • @ErikFrits
      @ErikFrits  Рік тому +1

      I never tried using numpy in my scripts.
      I've heard that it's possible but also quite buggy to make it work.
      You can try asking in pyRevit Forum and see if someone has a solution for you.

  • @euttanalekhakula4839
    @euttanalekhakula4839 10 місяців тому +1

    How to stubs setting in VS2022? Please advise!

    • @ErikFrits
      @ErikFrits  10 місяців тому

      If you mean regular Visual Studio then I'm not sure. I use it only for writing WPF forms and never code with python inside of it.
      You need to find a place where you can configure paths or interpreter and add similar to what we did in this video. Probably you will find a blog post or something about it.

  • @AteebHussein
    @AteebHussein 9 місяців тому +1

    Has there been an upate with stubs? It doesn't work for me.

    • @ErikFrits
      @ErikFrits  9 місяців тому

      Can you describe a bit more what is not working?
      1. Does regular python autocomplete works ?
      e.g.
      import os
      os.path.join ....

    • @AteebHussein
      @AteebHussein 9 місяців тому +1

      ​@@ErikFrits Thanks Erik. Update - I tried it for a long time yesterday setting the link to RVT 24 folder and it didn't work. I tried for RVT 23 just today and it does work. Did you have any problems runnig RVT 24?

    • @ErikFrits
      @ErikFrits  9 місяців тому +1

      ​@@AteebHussein Thanks for the insight and letting me know that RVT24 might have some issue.
      I need to check it, maybe I haven't updated something there. 🤔

    • @AteebHussein
      @AteebHussein 9 місяців тому

      @@ErikFrits Thanks for the great videos!

  • @jmco1045
    @jmco1045 Рік тому +1

    Great stuff Erik.
    Thks

  • @akp5899
    @akp5899 Рік тому +2

    Thanks so much making this video. I have tried to access the Sharepoint but it is coming up with an error that my login is not part of the directory.

    • @ErikFrits
      @ErikFrits  Рік тому +2

      Thanks for letting me know. I will place them on my website soon and update the link so it's easier to access ;)

    • @xoxoll
      @xoxoll Рік тому

      Looking forward to seeing it.@@ErikFrits

    • @ErikFrits
      @ErikFrits  Рік тому +1

      Hey, Check the new link in Comments/Description 😉

  • @eunicelo7574
    @eunicelo7574 9 місяців тому +1

    Thanks for this tutorial, Erik! But has anyone had any experience "is not defined by Pylance (reportUnderfinedVariable)"?

    • @ErikFrits
      @ErikFrits  9 місяців тому

      Haven't seen this error, but I also use pyCharm 95% of the time.
      You can provide a bit more context on how you got this error and code if it's related.

    • @franciscoa1097
      @franciscoa1097 9 місяців тому

      Same for me. But it was working fine for months, it just happened a few days ago for no reason. Did you find a solution?

    • @JeffHauswirth
      @JeffHauswirth 9 місяців тому +2

      I just tried setting this up for RVT 23 and I get
      Import "Autodesk.Revit.DB" could not be resolved Pylance(reportMissingImports)

    • @TheIdo14
      @TheIdo14 7 місяців тому

      ​@@JeffHauswirth any luck? Im facing the same issue
      @franciscoa1097 @eunicelo7574 @ErikFrits

  • @smitbangare9526
    @smitbangare9526 Рік тому +1

    Hello Erik, I am unable to access the Revit API Stub sharepoint link. I think it is limited to your workspace. Kindly update the link

    • @ErikFrits
      @ErikFrits  Рік тому +1

      Hi, check Download section on this Page:
      learnrevitapi.com/Free-Lessons/1-03_revit-api-autocomplete-in-vs-code

  • @HoangQuocPhuong-dng
    @HoangQuocPhuong-dng 9 місяців тому +1

    Help me please! it didn't work for me Revit API and aloso Pyrevit

    • @ErikFrits
      @ErikFrits  8 місяців тому

      Can you give me more feedback or error messages?
      Does regular python autocomplete works ?
      It's not an easy task to debug without an exact problem ;)

  • @sadekjooriah
    @sadekjooriah 11 місяців тому +1

    Thaaaaaaaaaaaaaaaank you!

    • @ErikFrits
      @ErikFrits  11 місяців тому

      Weeeelcome!
      Happy Coding!

  • @siyuguo2032
    @siyuguo2032 10 місяців тому +2

    We can now use VS Code to practice Macros in Revit 2025

    • @ErikFrits
      @ErikFrits  9 місяців тому

      oh nice, I haven't had time to look at Revit 2025 yet.

    • @art_forever_32
      @art_forever_32 2 місяці тому

      What? I thought Macros were obsolete! That's also awesome and very good to know! Thank you sir!