VS:GetTextOrientation

From Vectorworks Developer
Revision as of 14:32, 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 GetTextOrientation returns the position and orientation attributes of the referenced text object.

PROCEDURE GetTextOrientation(
theText :HANDLE;
VAR textOriginX,textOriginY :REAL;
VAR textAng :REAL;
VAR textIsMirrored :BOOLEAN);
def vs.GetTextOrientation(theText):
    return (textOrigin, textAng, textIsMirrored)

Parameters

theText HANDLE Handle to text object.
textOrigin REAL Returns coordinates of text origin.
textAng REAL Returns rotation angle of text.
textIsMirrored BOOLEAN Returns mirror state of text.

Example

VectorScript

PROCEDURE Example;
VAR
theText :HANDLE;
textOriginX, textOriginY, textAng :REAL;
textIsMirrored :BOOLEAN;
BEGIN
theText := FSActLayer;
GetTextOrientation(theText, textOriginX, textOriginY, textAng, textIsMirrored);
Locus(textOriginX, textOriginY);
END;
RUN(Example);

Python

def Example():
	theText = vs.FSActLayer()
	textOriginPt, textAng, textIsMirrored = vs.GetTextOrientation ( theText )
	vs.Locus(textOriginPt[0], textOriginPt[1])

Example()

Version

Availability: from VectorWorks8.0