The Revit Software Development Kit (SDK) contains useful resources to help you understand the Revit API and to create macros. The SDK includes the Revit API reference documentation, the full SDK API samples, and the Revit macro samples. The Revit SDK is available on:
The SDK is packaged in a ZIP file. After unzipping the SDK and agreeing to the license text, look for the RevitAPI.chm Help file. On a Windows computer, open the CHM file and refer to the classes, properties, and methods described there.