This site will attempt to record my exploration of the Revit API as it is accessed via the
Revit Ruby Shell by H�kon Clausen.
The following lines of code are needed to get things rolling:
load_assembly 'RevitAPI'
load_assembly 'RevitAPIUI'
include Autodesk::Revit
include Autodesk::Revit::UI
include Autodesk::Revit::DB
include Autodesk::Revit::DB::Architecture
Once everything is loaded and included, the
_app variable points to an instance of
Autodesk.Revit.UI.UIApplication and allows access to the following unique methods
_app.methods.sort-Object.methods
=> ['active_add_in_id', 'active_ui_document', 'application', 'application_closing', 'create_add_in_command_binding', 'create_ribbon_panel', 'create_ribbon_tab', 'dialog_box_showing', 'displaying_options_dialog', 'dispose', 'drawing_area_extents', 'finalize', 'get_ribbon_panels', 'idling', 'loaded_applications', 'main_window_extents', 'open_and_activate_document', 'remove_add_in_command_binding', 'view_activated', 'view_activating']
But the top of the heap for the API is
Autodesk::Revit. It is from here that everything else flows:
Autodesk::Revit.constants.sort
=> [:ApplicationServices, :Attributes, :Collections, :Creation, :DB, :Exceptions, :UI, :Utility]
Listed, with their constants, they are as follows (click to expand tree):