VS:GetArc

From Vectorworks Developer
Revision as of 14:30, 12 August 2013 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Description

Procedure GetArc returns the start and sweep angle of the referenced arc or round wall.

PROCEDURE GetArc(
h :HANDLE;
VAR startAngleR :REAL;
VAR arcAngleR :REAL);
def vs.GetArc(h):
    return (startAngleR, arcAngleR)

Parameters

h HANDLE Handle to arc.
startAngleR REAL Returns start angle of arc.
arcAngleR REAL Returns sweep angle of arc.

Remarks

On round walls, this call won't detect if the wall is reversed or not (should return the inverse of the angle, if the wall is reversed).

Example

VectorScript

PROCEDURE GetArcSetArcExample;
VAR
h :HANDLE;
startAng, sweepAng :REAL;
BEGIN
h := FSActLayer;
GetArc(h, startAng, sweepAng);
SetArc(h, startAng, sweepAng + 10);
END;
RUN(GetArcSetArcExample);

Python

def GetArcSetArcExample():
	h = vs.FSActLayer()
	if h != None:
		startAng, sweepAng = vs.GetArc(h)
		vs.SetArc(h, startAng, sweepAng + 10)
GetArcSetArcExample()

Version

Availability: from All Versions