VS:RectangleN: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
m (corrected the python code)
 
(2 intermediate revisions by one other user not shown)
Line 60: Line 60:
END;
END;
RUN(Example);</code>
RUN(Example);</code>
==== Python ====
==== Python ====
<code lang="py">
<code lang="py">
origin = [0, 1]
direction = [10, 10]
width = 5
height = 2


vs.RectangleN ( origin[0], origin[1], direction[0], direction[1], width, height )
</code>
</code>
</sample>
</sample>

Latest revision as of 13:40, 19 June 2020

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Creates and returns a handle to a new rectangle object with the specified bounds.

PROCEDURE RectangleN(
orginX,orginY :REAL;
directionX,directionY :REAL;
width :REAL;
height :REAL);
def vs.RectangleN(orgin, direction, width, height):
    return None

Parameters

orgin REAL
direction REAL
width REAL
height REAL

Remarks

This procedure does not return a handle.

Example

VectorScript

PROCEDURE Example;
BEGIN
RectangleN(0, 0, 1, 0, 1, 1);
END;
RUN(Example);

Python

origin = [0, 1]
direction = [10, 10]
width = 5
height = 2

vs.RectangleN ( origin[0], origin[1], direction[0], direction[1], width, height )

Version

Availability: from VectorWorks13.0