Revit 2013 has been released, and I presented an overview of the Revit 2013 API two days ago.
As always, the use of most of the API features is demonstrated by various SDK samples. For a better understanding of the use and contents of the Revit SDK in general, please refer to the getting started and self-preparation guides.
Here is an overview of the new samples:
These samples are all related to the new add-in integration functionality, except for the RoutingPreferenceTools which obviously demonstrate some of the MEP related enhancements.
By the way, the 'VSTA Samples' folder was renamed to 'Macro Samples' since VSTA was replaced by the open source SharpDevelop IDE.
Both of these display and show how to interact with a modeless form. One way to do this is to use the Idling event initially provided in Revit 2012, which we have discussed so much and in such depth in the past.
The ModelessForm_IdlingEvent sample should clarify many of the issues we dealt with, and is also related the material presented by Arnošt Löbel in his Autodesk University 2011 class CP5381 on asynchronous interactions and managing modeless UI.
The ModelessForm_ExternalEvent sample demonstrates an easier way to implement this interaction using the new external event interface.
The ProgressNotifier sample displays progress information for an action in a stack data structure for easier analysis. It demonstrates how to subscribe to the ProgressNotify related events, access properties in the event handler arguments, and organize the subtransaction progress information into a stack.
The RoutingPreferenceTools sample provides a number of MEP pipe routing preference tools.
This sample contains three commands, one for analysis and reporting purposes, two for importing and exporting routing preferences to XML:
The UIAPI sample demonstrates a number of the new add-in integration API features that I already listed, including embedding a Revit view as WPF control inside its own dialogue, the new drag and drop API, and the Options dialogue support for custom extensions using arbitrary WPF components. This sample was also shown at the DevDays 2011 conferences.
The WorkThread sample demonstrates utilizing the Idling event in a multi-threaded application to communicate with the Revit API from an external work thread.