T-FLEX Parametric CAD. Fundamentals. 2D Design
T-FLEX Parametric CAD. Fundamentals. 2D Design T-FLEX Parametric CAD. Fundamentals. 2D Design
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 «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. Creating Macros, Macro Editor A special Macro editor is provided for creating macros. Macro editor is a macro development environment integrated in T-FLEX, which contains the full set of editing and debugging tools. Writing a macro does not require any application or programming environment. All tools are packed within the Macro editor. The macro editor can be opened by the command: Keyboard Textual Menu Icon «Tools|Macro Editor» The macro editor contains a set of tools that makes development and management of macros easier. The figure below depicts the main tools of the macro editor. 741
Fundamentals. Two-Dimensional Design «Projects» Window The window can be accessed via the text menu of the macro editor: View|Projects. The T-FLEX CAD file appears in the macro editor as a Project. Each Project can include a set of Modules, Forms and References. A so-called modular programming approach is used when writing macros in T-FLEX CAD environment. Modular programming is the way of structuring a program as a union of small independent blocks, called modules, whose structure and behavior are governed by certain rules. Module is a separately compilable program unit which includes various components (types, constants, variables, namespaces, classes, procedures and functions). From the program source perspective, a macro is a procedure. Procedure is a part of a program devised for performing a certain specific task. Form is the dialog box of a macro, within which control elements can be placed (such as text, buttons, text input boxes, radio groups etc.), used for operating the macro. More details on working with this window will be revealed in the topic «Creating macros with screen forms» of this chapter. 742
- Page 691 and 692: Fundamentals. Two-Dimensional Desig
- Page 693 and 694: Fundamentals. Two-Dimensional Desig
- Page 695 and 696: Fundamentals. Two-Dimensional Desig
- Page 697 and 698: Fundamentals. Two-Dimensional Desig
- Page 699 and 700: Fundamentals. Two-Dimensional Desig
- Page 701 and 702: Fundamentals. Two-Dimensional Desig
- Page 703 and 704: Fundamentals. Two-Dimensional Desig
- Page 705 and 706: Fundamentals. Two-Dimensional Desig
- Page 707 and 708: Fundamentals. Two-Dimensional Desig
- Page 709 and 710: Fundamentals. Two-Dimensional Desig
- Page 711 and 712: Fundamentals. Two-Dimensional Desig
- Page 713 and 714: Fundamentals. Two-Dimensional Desig
- Page 715 and 716: Fundamentals. Two-Dimensional Desig
- Page 717 and 718: Fundamentals. Two-Dimensional Desig
- Page 719 and 720: Fundamentals. Two-Dimensional Desig
- Page 721 and 722: Fundamentals. Two-Dimensional Desig
- Page 723 and 724: Fundamentals. Two-Dimensional Desig
- Page 725 and 726: Fundamentals. Two-Dimensional Desig
- Page 727 and 728: Fundamentals. Two-Dimensional Desig
- Page 729 and 730: Fundamentals. Two-Dimensional Desig
- Page 731 and 732: Fundamentals. Two-Dimensional Desig
- Page 733 and 734: Fundamentals. Two-Dimensional Desig
- Page 735 and 736: Fundamentals. Two-Dimensional Desig
- Page 737 and 738: Fundamentals. Two-Dimensional Desig
- Page 739 and 740: Fundamentals. Two-Dimensional Desig
- Page 741: Fundamentals. Two-Dimensional Desig
- Page 745 and 746: Fundamentals. Two-Dimensional Desig
- Page 747 and 748: Fundamentals. Two-Dimensional Desig
- Page 749 and 750: Fundamentals. Two-Dimensional Desig
- Page 751 and 752: Fundamentals. Two-Dimensional Desig
- Page 753 and 754: Fundamentals. Two-Dimensional Desig
- Page 755 and 756: Fundamentals. Two-Dimensional Desig
- Page 757 and 758: Two-dimensional design CONVERTING D
- Page 759 and 760: Two-dimensional design Performing C
- Page 761 and 762: Two-dimensional design 760 After co
- Page 763: Two-dimensional design 762 Use of t
Macros<br />
A special folder «/Program/Macros/» is provided in the T-<strong>FLEX</strong> <strong>CAD</strong> installation directory. Macros<br />
of all Projects (*.grb files) located in this folder will be displayed in a special “Macros” window of T-<strong>FLEX</strong><br />
<strong>CAD</strong>.<br />
«Macros» Window<br />
The «Macros» window can be called by one of the following means:<br />
Keyboard Textual Menu Icon<br />
«Customize|Windows|Macros»<br />
The main purpose of this window is launching macros for execution.<br />
This window displays not only macros projects from the folder «/Program/Macros/»,<br />
but also the macros of the current open file.<br />
Storing a macro within a particular *.grb file does not imply that this macro can only<br />
be used in the given document. You can launch any of the macros displayed in that<br />
window. For example, the project «Copy layers.grb» is located in the folder<br />
“/Program/Macros/”. The «CopyLayers» macro, which copies layers from one<br />
document into another, can be arranged as follows: the user creates a new document or opens an already<br />
existing one. Upon launching the macro, the «file open» dialog appears, offering to select the file from which<br />
the layers are to be copied. After that, similar layers will be created in the current open file.<br />
The user can create one's own macros library by placing the files from Projects with macros to the<br />
folder»/Program/Macros/».<br />
To launch a macro for execution, select it in the «Macros» window and double-click .<br />
The icon preceding the macro marks its current state:<br />
–A selected macro.<br />
–A running macro.<br />
Creating Macros, Macro Editor<br />
A special Macro editor is provided for creating macros.<br />
Macro editor is a macro development environment integrated in T-<strong>FLEX</strong>, which contains the full set of<br />
editing and debugging tools. Writing a macro does not require any application or programming environment.<br />
All tools are packed within the Macro editor.<br />
The macro editor can be opened by the command:<br />
Keyboard Textual Menu Icon<br />
«Tools|Macro Editor»<br />
The macro editor contains a set of tools that makes development and management of macros easier. The<br />
figure below depicts the main tools of the macro editor.<br />
741