As I look through the Revit 2017 documentation it looks like C++ has become nearly a first class citizen. I am mostly familiar with starting AddIn Revit AddIn projects using the AddIn Wizard for C#. Is there something comparable for C++? And/or is there sample code or a tutorial on implementing a Revit 2017 AddIn using C++ instead of C# or VB?
I don't think that there are c++ samples. Found this post though:
http://thebuildingcoder.typepad.com/blog/2010/10/c-revit-add-in.html
This thread is a duplicate of
http://forums.autodesk.com/t5/revit-api-forum/looks-for-c-samples-for-revit-2017-addin/m-p/6744702
C++ has always been a first-class citizen in the .NET world, just like any other language supporting .NET, which was added to C++ with the introduction of managed C++ over a decade ago.
The Visual Studio C# and VB .NET wizards are very easy to create from scratch, and so is a C++ Revit add-in and a wizard for it.
The files that you create manually through these steps can be packaged into a ZIP file and reused to create a Revit C++ add-in wizard.
Look at the descriptions of creating, modifying and updating the C# and VB wizards to see how the same can be achieved for C++:
Here is an old description of a C++ Revit add-in and some other discussions on related topics::
I wish you lots of fun and success making use of C++ with the Revit API!
Please let us know how it goes and what you find out.
Thank you!
Cheers,
Jeremy
Thank you! I like the Visual C++ Revit Add-In step-by-step article. Regrettably the Visual Studio 2015 "New Project" function no longer includes "Class Library" as one of its options (screen shot provided below). Any thoughts on the alternative "New Project" template to utilize to initially create C++ based Revit Add-In in Visual Studio 15 for Revit 2017? Or if is a recommendation on which version of the .NET Framework to select?
Can't help you with the template, but the .NET framework I can, that should be 4.5 or higher, since Reivt 2017 needs 4.5 or higher.
Visual Studio > File > New > Project > Templates > Other Languages > Visual C++ > CLR > Class Library.
Add references to the Revit API assemblies.
Implement your external application or command.
The Revit 2017 API requires version the .NET framework version 4.5.2.
I summarised, cleaned up and published this Q&A on the blog:
http://thebuildingcoder.typepad.com/blog/2016/12/viewport-bring-to-front-and-c-revit-add-in.html#4
Cheers,
Jeremy