C# Class Revit.SDK.Samples.Ribbon.CS.Ribbon

Inheritance: IExternalApplication
显示文件 Open project: AMEE/revit

Public Methods

Method Description
AddNewLevels ( object sender, ComboBoxDropDownOpenedEventArgs args ) : void

Bind to combobox's DropDownOpened Event, add new levels that created by user.

DocumentCreated ( object sender, Autodesk e ) : void

Insert Level into ComboBox - LevelsSelector

OnShutdown ( UIControlledApplication application ) : Autodesk.Revit.UI.Result

Implement this method to implement the external application which should be called when Revit is about to exit, Any documents must have been closed before this method is called.

OnStartup ( UIControlledApplication application ) : Autodesk.Revit.UI.Result

Implement this method to implement the external application which should be called when Revit starts before a file or default template is actually loaded.

SetTextBoxValue ( object sender, TextBoxEnterPressedEventArgs args ) : void

Bind to text box's EnterPressed Event, show a dialogue tells user value of test box changed.

Private Methods

Method Description
CreateRibbonSamplePanel ( UIControlledApplication application ) : void

This method is used to create RibbonSample panel, and add wall related command buttons to it: 1. contains a SplitButton for user to create Non-Structural or Structural Wall; 2. contains a StackedBotton which is consisted with one PushButton and two Comboboxes, PushButon is used to reset all the RibbonItem, Comboboxes are use to select Level and WallShape 3. contains a RadioButtonGroup for user to select WallType. 4. Adds a Slide-Out Panel to existing panel with following functionalities: 5. a text box is added to set mark for new wall, mark is a instance parameter for wall, Eg: if user set text as "wall", then Mark for each new wall will be "wall1", "wall2", "wall3".... 6. a StackedButton which consisted of a PushButton (delete all the walls) and a PulldownButton (move all the walls in X or Y direction)

Method Details

AddNewLevels() public method

Bind to combobox's DropDownOpened Event, add new levels that created by user.
public AddNewLevels ( object sender, ComboBoxDropDownOpenedEventArgs args ) : void
sender object
args ComboBoxDropDownOpenedEventArgs
return void

DocumentCreated() public method

Insert Level into ComboBox - LevelsSelector
public DocumentCreated ( object sender, Autodesk e ) : void
sender object
e Autodesk
return void

OnShutdown() public method

Implement this method to implement the external application which should be called when Revit is about to exit, Any documents must have been closed before this method is called.
public OnShutdown ( UIControlledApplication application ) : Autodesk.Revit.UI.Result
application UIControlledApplication An object that is passed to the external application /// which contains the controlled application.
return Autodesk.Revit.UI.Result

OnStartup() public method

Implement this method to implement the external application which should be called when Revit starts before a file or default template is actually loaded.
public OnStartup ( UIControlledApplication application ) : Autodesk.Revit.UI.Result
application UIControlledApplication An object that is passed to the external application /// which contains the controlled application.
return Autodesk.Revit.UI.Result

SetTextBoxValue() public method

Bind to text box's EnterPressed Event, show a dialogue tells user value of test box changed.
public SetTextBoxValue ( object sender, TextBoxEnterPressedEventArgs args ) : void
sender object
args TextBoxEnterPressedEventArgs
return void