I recently received requests for a migration of the macro samples provided in the
Revit_Macro_Samples.rvt project. The version included in the Revit 2017 SDK miraculously is still based on Revit 2013 pre-release version, according to the update message displayed when opening it, and the macros cannot be executed successfully due to a number small Revit API enhancements made in the intervening years
– Solution – Sam comes to the rescue
– See the diffs on GitHub...