30.07.2013 Views

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Fundamentals</strong>. Two-Dimensional <strong>Design</strong><br />

MACROS<br />

740<br />

T-<strong>FLEX</strong> <strong>CAD</strong> design process often involves performing various calculations. Some tasks can be handled by<br />

using the variable editor. However, the variable editor offers only limited calculation capabilities. For<br />

example, it does not support use of loops. This limits the scope of tasks that can be handled directly within<br />

T-<strong>FLEX</strong> <strong>CAD</strong>.<br />

Another design issue that users face is much time spent for performing repetitive tasks. For example, it might<br />

be necessary to create a set of layers in one drawing that is similar to a set of layers in another drawing, and<br />

distribute the objects of the former drawing on the newly created layers. Such a task requires certain<br />

concentration, especially considering that the number of layers in the document may be large.<br />

Such issues can be easily addressed with the help of «macros».<br />

Here is another example: in the course of<br />

creating three-dimensional assembly models,<br />

the user may need to create slots and holes at the<br />

fastening locations for assembling parts, and<br />

insert fastener fragments with certain<br />

parameters. Use of macro helps automate this<br />

process, reducing the number of actions. One<br />

can write a macros, running which would let the<br />

user simply select an LCS in the scene, after<br />

which the system would automatically create the<br />

holes in the part, pick up the appropriate<br />

fastener set with certain parameters and insert it<br />

into the assembly. As this example<br />

demonstrates, a large number of actions that the<br />

user would have done manually are replaced by<br />

just two steps: launching a macros and selecting<br />

an LCS.<br />

Those are just a few examples where macros can be used.<br />

Working with Macros<br />

Macro in T-<strong>FLEX</strong> <strong>CAD</strong> is a program written in one of the programming languages, using T-<strong>FLEX</strong> <strong>CAD</strong><br />

API functions. For more details on using API functions, refer to the section Help “T-<strong>FLEX</strong> <strong>CAD</strong> API<br />

Manual”.<br />

A macro is executed as a single command, that is, by launching a macro once, the whole set of actions will<br />

be performed that are contained within the macro (calculations, handling of T-<strong>FLEX</strong> <strong>CAD</strong> objects,<br />

displaying results etc.).<br />

Macros are stored within the T-<strong>FLEX</strong> <strong>CAD</strong> *.grb files. At the same time, the *.grb file that contains macros<br />

is itself a Project. Each Project may contain an unlimited number of macros.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!