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

Room Schedule form, used to retrieve data from .xls data source and create new rooms.
Inheritance: System.Windows.Forms.Form
Datei anzeigen Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
MyMessageBox ( String strMsg, MessageBoxIcon icon ) : void

My custom message box

RoomScheduleForm ( ExternalCommandData commandData ) : System

Class constructor

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
CreateMyRoomSharedParameter ( ) : bool

Create shared parameter for Rooms category

GetAllLevelsAndPhases ( ) : void

Get all available levels and phases from current document

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

RoomCreationPreparation ( Phase &curPhase ) : bool

Some preparation and check before creating room.

RoomCreationStart ( ) : int

Some preparation and check before creating room.

ShareParameterExists ( String paramName ) : bool

Test if the Room binds a specified shared parameter

UpdateFormDisplay ( bool bUpdateAllRooms ) : void

Update control display of form call this method when create new rooms or switch the room show(show all or show by level)

UpdateNewRoom ( Room newRoom, int row ) : void

Update new room with values in spreadsheet, currently there are three columns need to be set.

UpdateRoomMapSheetInfo ( ) : void

Display current Room sheet information: Excel path

clearIDButton_Click ( object sender, EventArgs e ) : void

Clear all values of shared parameters Allow user to create more unplaced rooms and update map relationships between Revit and spreadsheet rooms.

closeButton_Click ( object sender, EventArgs e ) : void

Close the form.

importRoomButton_Click ( object sender, EventArgs e ) : void

Import room spread sheet and display them in form

levelComboBox_SelectedIndexChanged ( object sender, EventArgs e ) : void

Filter rooms by specified level.

newRoomButton_Click ( object sender, EventArgs e ) : void

Create new rooms according to spreadsheet based rooms data and specified phase.

showAllRoomsCheckBox_CheckedChanged ( object sender, EventArgs e ) : void

Show all rooms in current document

tablesComboBox_SelectedIndexChanged ( object sender, EventArgs e ) : void

Select one table(work sheet) and display its data to DataGridView control. after selection, generate data table from data source

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

MyMessageBox() public static method

My custom message box
public static MyMessageBox ( String strMsg, MessageBoxIcon icon ) : void
strMsg String message to be popped up
icon MessageBoxIcon icon to be displayed
return void

RoomScheduleForm() public method

Class constructor
public RoomScheduleForm ( ExternalCommandData commandData ) : System
commandData ExternalCommandData Revit external command data
return System