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.

circle.SetCenterAndNode(node1,node2);<br />

// Defining object text parameters<br />

text = new LineText(document);<br />

FontStyle style = text.FontStyle;<br />

style.FontName = "Arial";<br />

style.Bold = true;<br />

style.Italic = true;<br />

text.Color = 1;<br />

text.Node = node2;<br />

text.Circle = circle;<br />

text.TextValue = "Text on circle";<br />

text.HorizontalAlignment = TextHorizontalAlignment.Center;<br />

// Closing block of document changes<br />

document.EndChanges();<br />

}<br />

}<br />

Once the code of the macro is written, you need to compile the project.<br />

Compiling and Running Macros<br />

Compiling Project<br />

To start compilation, use the following option:<br />

Compile<br />

Macros<br />

Project compilation is a required action before executing the macro. When compiling, the system analyzes<br />

the macro code and finds errors. Compilation errors occur when the system fails to interpret the input text.<br />

Those errors could be due to incorrect syntax of an instruction or due to specifying an incorrect method or<br />

property.<br />

«Output» Window<br />

The «Output» window is located at the bottom of the macro editor. It serves for displaying messages about<br />

the current state of the project. Errors and warnings resulting from project compilation are displayed in this<br />

window.<br />

An error message displayed in this window contains information about the error location in the code window<br />

(line and column number) and the error number.<br />

To jump to an error location in the code window, you can either double-click or call the option «Go To<br />

Error» from the context menu accessible by right clicking .<br />

The error type and information about the error can be found in the Microsoft Developer Network (MSDN)<br />

application development guide by the code displayed within the error message in the «Output» window.<br />

747

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

Saved successfully!

Ooh no, something went wrong!