- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create a C++ revit plugin and the only source that I could have found is this old post from Jeremy:
https://thebuildingcoder.typepad.com/blog/2010/10/c-revit-add-in.html
I tried to follow the steps, but since it has been a while since that post was written had to change a few things:
1- The blog posts guides to create a Visual C++ Class Library project. I couldn't find a class library option under Visual C++ in VS 2019. So I created a Visual C++ > Windows Desktop > Dynamic-Link Library (DLL) project. The structure seems pretty similar to yours, but I has to add the header file myself.
2- To add the dependencies (RevitAPI, and RevitAPIUI) I had to enable CLR Support in Project Properties.
3- I had to change the TransactionMode to manual/Readonly
Other than that it compiled with no problem. When executing the command from Revit, Revit just hangs and the mouse pointer turns into a spinner. That lasts for about 2 minutes and then it goes away. If I add a TaskDialog to see if anything gets executed, it seems like nothing gets executed. I am buiding the dll with x64 configuration and I tried both Release and Debug (I tried win32 and the generated DLL doesn't do anything)
I am not quite sure what I am doing wrong, any help is highly appreciated.
Solved! Go to Solution.
Developer Advocacy and Support +