Handling Document Events Using Macros

Предыдущая страницаВ началоСледующая страница

Macros can be executed not only at the user's command, but also when any document event occurs. To set the connection of document events with macros, use the Message Handlers command dialog:

Macro Editor

Icon

Keyboard

Textual Menu

MacroDocuments1

 

Project > Message Handlers

When this command is called, the Message Handlers dialog opens. This dialog presents events, with the occurrence of which you can associate the execution of the macro:

34CreatingMacro30

Closing Document - an event that occurs before the document is closed;

Delete Fragment - an event that occurs on deletion of the current document from an assembly;

Document Full Regenerated - an event that occurs after the document is recalculated;

Document Open - an event that occurs after opening a document;

Document Saved - an event that occurs after the document is saved;

Dynamic Analysis Simulation After Step - an event that occurs after the execution of a step for solving a dynamic analysis study;

Dynamic Analysis Simulation Before Step - an event that occurs before the execution of a step in solving a dynamic analysis study;

Dynamic Analysis Simulation Finished - an event that occurs after the end of the solution to the dynamic analysis study;

Dynamic Analysis Simulation Started - an event that occurs after the start of solving a dynamic analysis study;

Edit Fragment - an event that occurs on launching the fragment editing command for the current document in an assembly;

Edit Fragment Variables - an event that occurs on launching the fragment variables editing command for the current document in an assembly;

Insert As Fragment - an event that occurs on insertion of the current document into an assembly;

New Document Created - an event that occurs after the creation of a new document;

Saving Document - an event that occurs before the document is saved;

Saving Product to T-FLEX DOCs - an event that occurs after calling the Save Product to T-FLEX DOCs command;

View Activated - an event that occurs after activation of a 2D or 3D document window;

View Deactivated - an event that occurs after the deactivation of the document view.

To set a handler for any event, select the required event in the list and click the Set button or Левый клик ТекстЛевый клик Текст. A dialog with a list of macros for this document will appear on the screen.