C# 클래스 Revit.SDK.Samples.AutoStamp.CS.EventsReactor

This class consists of two handler methods which will be subscribed to ViewPrinting and ViewPrinted events separately, The pre-event handler will create TextNote element when event is raised, and the post-event handler will delete it. Meanwhile, these two handler methods will be used to dump designed information to log file. It contains other methods which are used to dump related information(like events arguments and sequences) to log file PrintEventsLog.txt.
파일 보기 프로젝트 열기: AMEE/revit 1 사용 예제들

공개 메소드들

메소드 설명
AppViewPrinted ( object sender, Autodesk e ) : void

Handler method for ViewPrinted event. This handler will dump information of printed view firstly and then delete the TextNote created in pre-event handler.

AppViewPrinting ( object sender, Autodesk e ) : void

Handler method for ViewPrinting event. This method will dump EventArgument information of event firstly and then create TextNote element for this view. View print will be cancelled if TextNote creation failed.

CloseLogFiles ( ) : void

Close log files now

EventsReactor ( ) : System

Constructor method, it will only initialize m_assemblyPath. Notice that this method won't open log files at this time.

비공개 메소드들

메소드 설명
DumpEventArguments ( RevitAPIEventArgs eventArgs ) : void

Dump the events arguments to log file PrintEventsLog.txt. This method will only dump EventArguments of ViewPrint, two event arguments will be handled: ViewPrintingEventArgs and ViewPrintedEventArgs. Typical properties of EventArgs of them will be dumped to log file.

DumpViewInfo ( View view, String prefix ) : void

Dump information of view(View name and type) to log file.

SetupLogFiles ( ) : void

For singleton consideration, setup log file only when ViewPrinting is raised. m_eventsLog will be initialized and added to Trace.Listeners, PrintEventsLog.txt will be removed if it already existed.

메소드 상세

AppViewPrinted() 공개 메소드

Handler method for ViewPrinted event. This handler will dump information of printed view firstly and then delete the TextNote created in pre-event handler.
public AppViewPrinted ( object sender, Autodesk e ) : void
sender object Event sender.
e Autodesk Event arguments of ViewPrinted event.
리턴 void

AppViewPrinting() 공개 메소드

Handler method for ViewPrinting event. This method will dump EventArgument information of event firstly and then create TextNote element for this view. View print will be cancelled if TextNote creation failed.
public AppViewPrinting ( object sender, Autodesk e ) : void
sender object Event sender.
e Autodesk Event arguments of ViewPrinting event.
리턴 void

CloseLogFiles() 공개 메소드

Close log files now
public CloseLogFiles ( ) : void
리턴 void

EventsReactor() 공개 메소드

Constructor method, it will only initialize m_assemblyPath. Notice that this method won't open log files at this time.
public EventsReactor ( ) : System
리턴 System