BIM World
A Professional BIM Learning Platform


Mastering Revit: A Guide to Functional Development and Secondary Customization Methods

Revit supports two types of external application plugins: external commands and external applications. The IExternalCommand interface defines external commands, with Excel functionality uniquely related to this interface. Before implementing functional code, the Excel-related features must be loaded and temporarily suspended. On the other hand, the IExternalApplication interface manages external applications, operating similarly to the external command interface. However, it includes two specific callback functions: OnStartup and OnShutdown. Developers can customize Revit’s behavior by implementing these functions after completing the IExternalApplication development.

BIM skills | How can Revit software achieve functional development? Revit Secondary Development Method and Process

Revit Secondary Development Process

The secondary development process in Revit involves two main stages: code compilation and code debugging.

First, set up the development environment. This requires three key components: the development target, programming software, and programming language. Using the Revit model as the development target, launch Visual Studio 2019 and select C# as the programming language. Create a new library project within Visual Studio. Next, add references to the project, including RevitAPI.dll and RevitAPIUI.dll. Since the project involves generating Excel spreadsheets, also include references to Microsoft Excel libraries. Make sure to set the target framework to one compatible with your operating system to avoid errors during compilation.

Second, write the code based on the desired functionality. You can explore the Revit Lookup tool to understand the methods and properties available. By leveraging the extensive classes, methods, and properties provided by the Revit API, write the specific code to implement your features.

Third, debug the code within Visual Studio 2019. Before running the plugin in Revit, it’s essential to ensure the code compiles and runs correctly. After successful debugging, copy the generated .dll file into the Revit directory. If errors occur during debugging, review the error messages, correct the code accordingly, and repeat the debugging process until successful.

Finally, run the plugin. After compilation, launch Revit and navigate to the “Add-Ins” tab. Click on “External Tools” in the dropdown menu, which opens a command selection dialog. Select “AddinManager” to open the plugin manager window. Paste the full path of the .dll file into the dialog box and click “Run” to execute the plugin. This process activates the programmed functions within Revit.

xuebim
Follow the latest BIM developments in the architecture industry, explore innovative building technologies, and discover cutting-edge industry insights.
← Scan with WeChat
Like(0) 打赏
BIM WORLD » Mastering Revit: A Guide to Functional Development and Secondary Customization Methods

Comment Get first!

Must log in before commenting!

 

BIM World, A Professional BIM Learning Platform

Stay updated on the latest architecture trends and share new building technologies.

Contact UsAbout Us

觉得文章有用就打赏一下小编吧

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

Account Login

By signing in, you agree toUser Agreement

Sign Up