C# 클래스 Revit.SDK.Samples.RoomSchedule.EventsReactor

Class consists of delegate methods of DocumentSaving/SavingAs and DocumentClosing events. These delegates will be raised once document is about to be saved or closed. But, delegate will update mapped spreadsheet only when user created rooms for current document. (That's, user clicks the button "Create Unplaced Rooms" and new rooms was created successfully). Otherwise, these events handler methods won't do any update even if they were raised.
상속: IDisposable
파일 보기 프로젝트 열기: AMEE/revit 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void

Release the file handling

DocMappedSheetInfo ( int hashCode, SheetInfo &sheetInfo ) : bool

Get the sheet information of document.

DocMonitored ( int docHashcode ) : bool

Check if document is monitored by this event reactor

DocumentClosed ( object sender, DocumentClosedEventArgs e ) : void

Removed the document which was closed, event reactor doesn't need to monitor this document any more. DocumentId is designed to identify one document, it's equal to hash code of this document.

DocumentSaving ( object sender, DocumentSavingEventArgs e ) : void

Delegate for document save event, it will update spreadsheet if document was mapped to spreadsheet.

DocumentSavingAs ( object sender, DocumentSavingAsEventArgs e ) : void

Delegate for document save as event, it will update spreadsheet if document was mapped to spreadsheet.

EventsReactor ( String logFile ) : System

This class will dump information to log file to tell user what happened

UpdateSheeInfo ( int hashCode, SheetInfo newSheetInfo ) : void

Update or reset the sheet information to which document is being mapped.

비공개 메소드들

메소드 설명
DumpLog ( String strLog ) : void

Dump log file now

SetExternalRoomIdToRoomId ( Room room ) : bool

Set shared parameter (whose name is "External Room ID") value to Room.Id.IntegerValue

UpdateMappedSpreadsheet ( System.Windows.Forms.Document activeDocument ) : void

Update mapped spread sheet when document is about to be saved or saved as This method will update spread sheet room data([Area] column) with actual area value of mapped Revit Room. or add Revit room to spreadsheet if it is not mapped to room of spreadsheet. ///

ValidateRevitRoom ( System.Windows.Forms.Document activeDocument, Room room, double &roomArea, String &externalId ) : bool

Check to see if we need to update spreadsheet data according to this Revit room. We don't need to update spreadsheet rooms if Revit room: . Which is one unplaced room. . The room has area which is zero. . Special room which doesn't have custom shared parameter at all.

메소드 상세

Dispose() 공개 메소드

Release the file handling
public Dispose ( ) : void
리턴 void

DocMappedSheetInfo() 공개 메소드

Get the sheet information of document.
public DocMappedSheetInfo ( int hashCode, SheetInfo &sheetInfo ) : bool
hashCode int The hash code of document.
sheetInfo SheetInfo The mapped spread file and sheet information.
리턴 bool

DocMonitored() 공개 메소드

Check if document is monitored by this event reactor
public DocMonitored ( int docHashcode ) : bool
docHashcode int Hashcode of document.
리턴 bool

DocumentClosed() 공개 메소드

Removed the document which was closed, event reactor doesn't need to monitor this document any more. DocumentId is designed to identify one document, it's equal to hash code of this document.
public DocumentClosed ( object sender, DocumentClosedEventArgs e ) : void
sender object
e DocumentClosedEventArgs
리턴 void

DocumentSaving() 공개 메소드

Delegate for document save event, it will update spreadsheet if document was mapped to spreadsheet.
public DocumentSaving ( object sender, DocumentSavingEventArgs e ) : void
sender object Event sender.
e DocumentSavingEventArgs EventArgs of this event.
리턴 void

DocumentSavingAs() 공개 메소드

Delegate for document save as event, it will update spreadsheet if document was mapped to spreadsheet.
public DocumentSavingAs ( object sender, DocumentSavingAsEventArgs e ) : void
sender object Event sender.
e DocumentSavingAsEventArgs EventArgs of this event.
리턴 void

EventsReactor() 공개 메소드

This class will dump information to log file to tell user what happened
public EventsReactor ( String logFile ) : System
logFile String
리턴 System

UpdateSheeInfo() 공개 메소드

Update or reset the sheet information to which document is being mapped.
public UpdateSheeInfo ( int hashCode, SheetInfo newSheetInfo ) : void
hashCode int Hash code of document used as key to find mapped spreadsheet.
newSheetInfo SheetInfo New value for spreadsheet.
리턴 void