The latest update for Fusion went out this past weekend so if you’ve run Fusion since then you have it. You’ll now see a new “C++” option when you create a new script or add-in, as shown below.
That will create a new C++ project. A C++ project consists of a .manifest file, (the same as Python and JavaScript), but also a .cpp file and two project files; a .vcxproj file for Windows and Visual Studio and a .xcodeproj file for Mac and XCode.
The API is the same as what’s been exposed for Python and JavaScript. In fact the Python and JavaScript interfaces are layers on top of the C++ interface. Each language has it’s own quirks so the API is used a bit differently for each one but it is the same API. You can read all about the C++ quirks in the C++ Specific Issues topic in the Fusion 360 API User’s Manual.
Some highlights of the C++ API are:
- You can now deliver your applications as a binary file instead of source code.
- You now have a typed language which means you’ll be able to user reliable Intellisense (code hints) when writing your program. This is a huge benefit and means you’ll spend a lot less time in the documentation looking to see what methods and properties a certain object supports and what the arguments are for a particular function.
- Performance is much better than Python and JavaScript.
- You get to use a development environment you’re already familiar with.
Probably the biggest downside is that because you’re delivering the runtime binary, you have to compile your code separately for Windows and Mac. Except in cases where you’re using Windows or Mac specific libraries you should be able to have a single set of source but you’ll need to compile it on Windows to create the Windows compatible .dll file and then also compile it on a Mac to create a Mac compatible .dylib file.
You can post any comments (positive or negative) or problems you have to the Fusion 360 API forum, where I’ll be watching.
-Brian