Macro in T-FLEX CAD is a program written in one of the programming languages, using T-FLEX CAD API functions. For more details on using API functions, refer to the section Help "T-FLEX CAD API Manual".
A macro is executed as a single command, that is, by launching a macro once, the whole set of actions will be performed that are contained within the macro (calculations, handling of T-FLEX CAD objects, displaying results etc.).
Macros are stored within the T-FLEX CAD *.grb files. At the same time, the *.grb file that contains macros is itself a Project. Each Project may contain an unlimited number of macros.
A special folder «/Program/Macros/» is provided in the T-FLEX CAD installation directory. Macros of all Projects (*.grb files) located in this folder will be displayed in a special "Macros" window of T-FLEX CAD.
«Macros» window
The «Macros» window can be called by one of the following means:
Keyboard |
Textual Menu |
Icon |
<Alt><5> |
«Customize|Windows|Macros» |
The main purpose of this window is launching macros for execution. This window displays not only macros projects from the folder «/Program/Macros/», but also the macros of the current open file. Storing a macro within a particular *.grb file does not imply that this macro can only be used in the given document. You can launch any of the macros displayed in that window. For example, the project «Copy layers.grb» is located in the folder "/Program/Macros/". The «CopyLayers» macro, which copies layers from one document into another, can be arranged as follows: the user creates a new document or opens an already existing one. Upon launching the macro, the «file open» dialog appears, offering to select the file from which the layers are to be copied. After that, similar layers will be created in the current open file.
The user can create one's own macros library by placing the files from Projects with macros to the folder»/Program/Macros/».
To launch a macro for execution, select it in the «Macros» window and double-click .
The icon preceding the macro marks its current state:
–A selected macro.
–A running macro.