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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

‘Opening block of documents changes<br />

document.BeginChanges("Creating graphic lines")<br />

‘Creating graphic line and <strong>2D</strong> free node objects<br />

Dim line As ConstructionOutline<br />

Dim node1 As FreeNode<br />

Dim node2 As FreeNode<br />

Dim X_1, Y_1, X_2, Y_2 As Double<br />

X_1 = System.Convert.ToDouble(NodeX1)<br />

Y_1 = System.Convert.ToDouble(NodeY1)<br />

X_2 = System.Convert.ToDouble(NodeX2)<br />

Y_2 = System.Convert.ToDouble(NodeY2)<br />

‘Creating <strong>2D</strong> free nodes<br />

node1 = new FreeNode(document,new Parameter(X_1),new Parameter(Y_1 ))<br />

node2 = new FreeNode(document,new Parameter(X_2),new Parameter(Y_2 ))<br />

‘Creating graphic line between two nodes<br />

line = new ConstructionOutline(document,node1,node2)<br />

‘Closing block of document changes<br />

document.EndChanges()<br />

End Sub<br />

End Class<br />

End Namespace<br />

Macros<br />

When the macro is executed in T-<strong>FLEX</strong> <strong>CAD</strong>, the «FormLine» dialog appears. Upon clicking the control<br />

element – the «OK» button, a segment will be created between the two nodes in the drawing area.<br />

755

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

Saved successfully!

Ooh no, something went wrong!