C# Class Revit.SDK.Samples.RoomSchedule.RoomsData

Iterates through the rooms in the project and get the information of all the rooms
Mostra file Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
GenRoomsDataTable ( Level level ) : DataTable

Generate all rooms which are located in specified level. A DataTable data object will be generated after this method call.

GetProperty ( System.Windows.Forms.Document activeDoc, Room room, BuiltInParameter paraEnum, bool useValue ) : String

Get the room property value according the parameter name

RoomsData ( System.Windows.Forms.Document activeDocument ) : System

Constructor

ShareParameterExists ( Room roomObj, String paramName, Parameter &sharedParam ) : bool

Check to see whether specified parameter exists in room object.

UpdateParameters ( ReadOnlyCollection specifiedParams ) : void

Get all parameters to be displayed in DataGridView.

UpdateRoomsData ( ) : void

Update rooms data after room creation happens in Revit

Private Methods

Method Description
CompRoomByNumber ( Room room1, Room room2 ) : int

Sort the rooms by number

GetAllRooms ( System.Windows.Forms.Document activeDoc ) : void

Get all rooms in current Revit project

InitializeParameters ( ) : void

Initialize the parameters displayed in DataGridView control

Method Details

GenRoomsDataTable() public method

Generate all rooms which are located in specified level. A DataTable data object will be generated after this method call.
public GenRoomsDataTable ( Level level ) : DataTable
level Level the specified level to retrieve rooms
return System.Data.DataTable

GetProperty() public static method

Get the room property value according the parameter name
public static GetProperty ( System.Windows.Forms.Document activeDoc, Room room, BuiltInParameter paraEnum, bool useValue ) : String
activeDoc System.Windows.Forms.Document Current active document.
room Room an instance of room class
paraEnum BuiltInParameter the parameter used to get parameter value
useValue bool convert parameter to value type or not. /// if true, the value of parameter will be with unit. /// if false, the value of parameter will be without unit.
return String

RoomsData() public method

Constructor
public RoomsData ( System.Windows.Forms.Document activeDocument ) : System
activeDocument System.Windows.Forms.Document Revit project.
return System

ShareParameterExists() public static method

Check to see whether specified parameter exists in room object.
public static ShareParameterExists ( Room roomObj, String paramName, Parameter &sharedParam ) : bool
roomObj Room Room object used to get parameter
paramName String parameter name to be checked
sharedParam Parameter shared parameter returned
return bool

UpdateParameters() public method

Get all parameters to be displayed in DataGridView.
public UpdateParameters ( ReadOnlyCollection specifiedParams ) : void
specifiedParams ReadOnlyCollection all parameters specified by user.
return void

UpdateRoomsData() public method

Update rooms data after room creation happens in Revit
public UpdateRoomsData ( ) : void
return void