C# 클래스 RvtSamples.Application

Main external application class. A generic menu generator application. Read a text file and add entries to the Revit menu. Any number and location of entries is supported.
상속: IExternalApplication
파일 보기 프로젝트 열기: AMEE/revit

공개 메소드들

메소드 설명
AddSample ( string lines, int n, int &i ) : void

Add a new command to the corresponding pulldown button.

ErrorMsg ( string msg ) : void

Display error message

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.

비공개 메소드들

메소드 설명
AddCustomizedPulldownMenus ( ) : void

Add samples of categories not in default categories

AddSampleToPulldownMenu ( PulldownButton pullDownButton, SampleItem item ) : void

Add sample item to pulldown menu

AddSamplesToDefaultPulldownMenus ( ) : void

Add samples of categories in default categories

AddSamplesToStackedButtons ( IList buttons ) : void

Add samples to corresponding pulldown button

GetDisplayNameByEnumName ( string enumName ) : string

Get a button's display name by its enum name

GetEnumNameByDisplayName ( string name ) : string

Get a button's enum name by its display name

GetFilepath ( string &filename ) : bool

Get the input file path. Search and return the full path for the given file in the current exe directory or one or two directory levels higher.

ReadAllLinesWithInclude ( string filename ) : string[]

Read file contents, including contents of files included in the current file

RemoveComments ( string lines ) : string[]

Remove all comments and empty lines from a given array of lines. Comments are delimited by '#' to the end of the line.

SortByDisplayName ( SampleItem item1, SampleItem item2 ) : int

Comparer to sort sample items by their display name

SortSampleItemsInOneCategory ( SortedList menus ) : void

Sort samples in one category by the sample items' display name

메소드 상세

AddSample() 공개 메소드

Add a new command to the corresponding pulldown button.
public AddSample ( string lines, int n, int &i ) : void
lines string Array of lines defining sample's category, display name, description, large image, image, assembly and classname
n int Total number of lines in array
i int Current index in array
리턴 void

ErrorMsg() 공개 메소드

Display error message
public ErrorMsg ( string msg ) : void
msg string Message to display
리턴 void

OnShutdown() 공개 메소드

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.
리턴 Autodesk.Revit.UI.Result

OnStartup() 공개 메소드

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.
리턴 Autodesk.Revit.UI.Result