© 2010 Autodesk
Introduction to Revit 2011 API
§Revit のバージョンとドキュメントのタイトル名を取得
コマンド データ
Revit オブジェクトモデルにアクセス
''  access to the version of Revit and the title of the document currently in use
Dim versionName As String = _
    commandData.Application.Application.VersionName
Dim documentTitle As String = _
    commandData.Application.ActiveUIDocument.Document.Title
''  print out wall types available in the current rvt project
Dim wallTypes As WallTypeSet = _
            commandData.Application.ActiveUIDocument.Document.WallTypes
Dim s As String = ""
    For Each wType As WallType In wallTypes
        s = s + wType.Name + vbCr
    Next
§壁の全てのタイプを取得
この例では、UIApplication オブジェクトからRevitのバージョンを取得し、さらに、アクティブなドキュメントのタイトルを取得したり、また、アクティブなドキュメントのデータベースの部分にアクセスしてドキュメントに含めれる全ての壁のタイプを取得しています。