Set Up Revit API Project File

  1. Open Visual Studio

  2. Click on Create a new project

  3. Search the term ''Class Library c# (.NET Framework)''

Creating the new Class Library File

Visual Studio Class Library File Set up
Visual Studio Class Library File Set up

Add the requied Revit API dlls

  1. Right click on References and add the references (.dll files) from the location

  2. C:\Program Files\Autodesk\Revit Version\RevitAPI.dll

  3. C:\Program Files\Autodesk\Revit Version\RevitAPIUI.dll

Solution setting

  1. Right click on solution and add click on the Properties

  2. In the properties window click on Debug menu

Click on the Start external program and mention the corresponding location of Revit.exe file

example: C:\Program Files\Autodesk\Revit 2022\Revit.exe

Set the Revit execution file location for debugging

Set the Application setting

  1. Click on the Application

  2. Set the Assembly name as per the requirement, the name of the dll will be as per Assembly name.

  3. Set the Target framework to version 4.8.1.

Dll file setting

  1. Right click on the added dll files from References.

  2. Select Copy Local option to False.