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

Iterates through the rooms in the project and get the information of all the rooms
Afficher le fichier Open project: AMEE/revit Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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
Résultat System.Data.DataTable

GetProperty() public static méthode

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.
Résultat String

RoomsData() public méthode

Constructor
public RoomsData ( System.Windows.Forms.Document activeDocument ) : System
activeDocument System.Windows.Forms.Document Revit project.
Résultat System

ShareParameterExists() public static méthode

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
Résultat bool

UpdateParameters() public méthode

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

UpdateRoomsData() public méthode

Update rooms data after room creation happens in Revit
public UpdateRoomsData ( ) : void
Résultat void