skip to Main Content

In my office, I have a PC that does not meet the minimum requirements to install Revit. I want to use it just for writing my API codes in VS Code, so I can use them later on another PC with Revit installed

here my settings in vscode

enter image description here

As an example, I can acces Autodesk.Revit.DB as shown below but not the classs FilteredElementCollector

enter image description here

2

Answers


  1. You can probably achieve what you need simply by copying the Revit API .NET assembly DLLs onto your programming machine. They are installed in the same directory as Revit.exe. They are also available in various NuGet packages; search for something like NuGet Revit API to find them.

    Login or Signup to reply.
  2. Yes you can! I use it in a daily basis as a RevitAPI developer!

    First you need to create stubs that are dummy "objects". You can use this (https://github.com/gtalarico/ironpython-stubs or https://github.com/BIMOpenGroup/RevitAPIStubs) library to create them. If you don’t have revit installed someone might help you create them.

    After creating them you have to add their path to the VSCode workspace settings.json.

        "python.autoComplete.extraPaths": [
        "${workspaceFolder}\etc\revit-api-stubs\common",
        "${workspaceFolder}\etc\revit-api-stubs\revit\2022",
    

    After adding them it will show up on autocomplete.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search