BeginText | Objects - Text |
Declaration:
PROCEDURE BeginText
; Description:
Procedures BeginText creates a new text object in a VectorWorks document. All text specified between calls to BeginText and EndText will be part of the new text object.
Text may be specified in single quotes, or variables may be used..
To specify the insertion point of the new text object, use TextOrigin.
Example:
TextOrigin(0,0); BeginText; 'VectorScript created text object' EndText; {creates a text object whose insertion point is at 0,0} TextFont(4); TextSize(24); TextOrigin(1,1); BeginText; '24 pt Monaco text' EndText; {specifying attributes for a new text object}
CreateText | Objects - Text |
Declaration:
PROCEDURE CreateText
( theText:STRING ) ; Description:
Procedure CreateText creates a new text object in a VectorWorks document. The text object is created using the current pen position and default attributes.Parameters:
theText Text string (0-255 characters). Example:
CreateText('This is a text object.'); Move(2,2); CreateText('This is another text object.');See Also:
BeginText EndText
EndText | Objects - Text |
Declaration:
PROCEDURE EndText
; Description:
Procedure EndText completes creation of a new text object.See Also:
BeginText CreateText
GetFont | Objects - Text |
Declaration:
FUNCTION GetFont
( h:HANDLE ) :INTEGER ; Special Notes:
GetFont is obsolete as of MiniCAD 5.0
Description:
Obsolete function.
Parameters:
h Handle to text object. See Also:
GetTextFont
GetFontID | Objects - Text |
Declaration:
FUNCTION GetFontID
( fontName:STRING ) :INTEGER ; Description:
Function GetFontID converts the string name of an available font to a font ID which can be passed to other VectorScript routines.Parameters:
fontName Name of installed font.
GetFontName | Objects - Text |
Declaration:
FUNCTION GetFontName
( fontID:INTEGER ) :STRING ; Description:
Function GetFontName converts a system font ID to a font name.
An integer ID with a value representing a font in the current operating system.Parameters:
fontID Font ID value.
GetSize | Objects - Text |
Declaration:
FUNCTION GetSize
( h:HANDLE ) :INTEGER ; Special Notes:
GetSize is obsolete as of MiniCAD 5.0
Description:
Obsolete function.Parameters:
h Handle to text object. See Also:
GetTextSize
GetStyle | Objects - Text |
Declaration:
FUNCTION GetStyle
( h:HANDLE ) :INTEGER ; Special Notes:
GetStyle is obsolete as of MiniCAD 5.0
Description:
Obsolete function.Parameters:
h Handle to text object. See Also:
GetTextStyle
GetText | Objects - Text |
Declaration:
FUNCTION GetText
( objectHd:HANDLE ) :STRING ; Description:
Function GetText returns the text contained within the referenced text object.Parameters:
objectHd Handle to text object. See Also:
SetText
GetTextFont | Objects - Text |
Declaration:
FUNCTION GetTextFont
( objectHd :HANDLE; Position :INTEGER ) :INTEGER ; Description:
Procedure GetTextFont returns the font of the referenced text object at a specified position in the string.
The position is in a range between 0 and 32767, representing a character position in the text string. An index of 0 refers to the first character in the string.Parameters:
objectHd Handle to text object. Position Position in text string. Example:
fontID:=GetTextFont(handleToText,2);See Also:
GetFontName GetFontID
GetTextJust | Objects - Text |
Declaration:
FUNCTION GetTextJust
( TextHd:HANDLE ) :INTEGER ; Description:
Function GetTextJust returns the text justification of the referenced text object.
Table - Text Justification
Justification Constant Left 1 Center 2 Right 3 Parameters:
TextHd Handle to text object.
GetTextLeading | Objects - Text |
Declaration:
FUNCTION GetTextLeading
( theText:HANDLE ) :REAL ; Description:
Procedure GetTextLeading returns the custom leading value(in points) of the referenced text object.Parameters:
theText Handle to text object.
GetTextLength | Objects - Text |
Declaration:
FUNCTION GetTextLength
( TextHd:HANDLE ) :INTEGER ; Description:
GetTextLength returns the string length of the referenced text object.Parameters:
TextHd Handle to text object.
GetTextOrientation | Objects - Text |
Declaration:
PROCEDURE GetTextOrientation
( theText :HANDLE; VAR textOriginX :REAL; VAR textOriginY :REAL; VAR textAng :REAL; VAR textIsMirrored :BOOLEAN ) ; Description:
Procedure GetTextOrientation returns the position and orientation attributes of the referenced text object.Parameters:
theText Handle to text object. textOrigin Returns coordinates of text origin. textAng Returns rotation angle of text. textIsMirrored Returns mirror state of text.
GetTextSize | Objects - Text |
Declaration:
FUNCTION GetTextSize
( TextHd :HANDLE; Position :INTEGER ) :REAL ; Description:
Procedure GetTextSize returns the text point size at a specified position within the referenced text object.
The position is in a range between 0 and 32767, representing a character position in the text string. An index of 0 refers to the first character in the string.Parameters:
TextHd Handle to text object. Position Position in text string.
GetTextSpace | Objects - Text |
Declaration:
FUNCTION GetTextSpace
( theText:HANDLE ) :INTEGER ; Description:
Procedure GetTextSpace returns the line spacing of the referenced text object.
Table - Text Spacing
Leading Constant Single space 2 1 1/2 space 3 Double space 4 Parameters:
theText Handle to text object.
GetTextStyle | Objects - Text |
Declaration:
FUNCTION GetTextStyle
( TextHd :HANDLE; Position :INTEGER ) :INTEGER ; Description:
Procedure GetTextStyle returns the text style at a specified position within the referenced text object.
The position is in a range between 0 and 32767, representing a character position in the text string. An index of 0 refers to the first character in the string.Parameters:
TextHd Handle to text object. Position Position in text string.
GetTextVerticalAlign | Objects - Text |
Declaration:
FUNCTION GetTextVerticalAlign
( TextHd:HANDLE ) :INTEGER ; Description:
Function GetTextVerticalAlign returns the vertical alignment of the referenced text object.
Table - Text Vertical Justification
Justification Constant Top of text box 1 Top baseline 2 Text centerline 3 Bottom baseline 3 Bottom of text box 3 Parameters:
TextHd Handle to text object.
GetTextWidth | Objects - Text |
Declaration:
FUNCTION GetTextWidth
( theText:HANDLE ) :REAL ; Description:
Procedure GetTextWidth returns the margin width of the referenced text object.Parameters:
theText Handle to text object.
GetTextWrap | Objects - Text |
Declaration:
FUNCTION GetTextWrap
( theText:HANDLE ) :BOOLEAN ; Description:
Procedure GetTextWrap returns the text wrap mode of the referenced text object.Parameters:
theText Handle to text object.
SetText | Objects - Text |
Declaration:
PROCEDURE SetText
( objectHd :HANDLE; text :STRING ) ; Description:
Procedure SetText sets the content of the referenced text object. The new text is assigned the font, size and style characteristics of the first character of the old text string.Parameters:
objectHd Handle to text object. text New text string value. Example:
SetText(hText,'A new text string value');
SetTextFont | Objects - Text |
Declaration:
PROCEDURE SetTextFont
( objectHd :HANDLE; Start :INTEGER; Count :INTEGER; FontNum :INTEGER ) ; Description:
Procedure SetTextFont sets the font of a substring in the referenced text object.Parameters:
objectHd Handle to text object. Start Start position in text string. Count Length of substring. FontNum Font ID for substring. Example:
SetTextFont(handleToText,0,5,GetFontID('Helvetica')); {sets the first five characters of the referenced text string to Helvetica}See Also:
GetFontID GetFontID
SetTextJust | Objects - Text |
Declaration:
PROCEDURE SetTextJust
( TextHd :HANDLE; JustFlag :INTEGER ) ; Description:
Procedure SetTextJust sets the text justification of the referenced text object.
Table - Text Justification
Justification Constant Left 1 Center 2 Right 3
Parameters:
TextHd Handle to text object. JustFlag Justification setting for text.
SetTextLeading | Objects - Text |
Declaration:
PROCEDURE SetTextLeading
( theText :HANDLE; leading :REAL ) ; Description:
Procedure SetTextLeading sets the line spacing of the referenced text object to a custom leading value(in points).Parameters:
theText Handle to text object. leading Custom leading value for text.
SetTextOrientation | Objects - Text |
Declaration:
PROCEDURE SetTextOrientation
( theText :HANDLE; textOriginX :REAL; textOriginY :REAL; textAngle :REAL; textIsMirrored :BOOLEAN ) ; Description:
Procedure SetTextOrientation sets the position and orientation attributes of the referenced text object.Parameters:
theText Handle to text object. textOrigin Coordinates of text object origin. textAngle Rotation angle for text object. textIsMirrored Mirroring setting for text object.
SetTextSize | Objects - Text |
Declaration:
PROCEDURE SetTextSize
( objectHd :HANDLE; Start :INTEGER; Count :INTEGER; Size :REAL ) ; Description:
Procedure SetTextSize sets the text size of a specified substring in the referenced text object. Parameters Start and Count specify the substring start position and substring length. Parameter Size specifies the size(in points) to be assigned to the substring.Parameters:
objectHd Handle to text object. Start Start position in text string. Count Length of substring. Size Text size setting for substring. Example:
SetTextSize(HandleToText,0,5,24); {set the first five characters of the referenced text string to 24 point text}
SetTextSpace | Objects - Text |
Declaration:
PROCEDURE SetTextSpace
( theText :HANDLE; spacing :INTEGER ) ; Description:
Procedure SetTextSpace sets the line spacing of the referenced text object.
Table - Text Spacing
Leading Constant Single space 2 1 1/2 space 3 Double space 4 Parameters:
theText Handle to text object. spacing Line spacing for text.
SetTextStyle | Objects - Text |
Declaration:
PROCEDURE SetTextStyle
( objectHd :HANDLE; Start :INTEGER; Count :INTEGER; Style :INTEGER ) ; Description:
Procedure SetTextStyle sets the text style of a specified substring in the referenced text object.
Table - Text Style
Style Constant Plain 0 Bold 2 Italic 4 Underline 8 Outline 16 Shadowed 32 Parameters:
objectHd Handle to text object. Start Start position in text string. Count Length of substring. Style Text style setting for substring. Example:
SetTextSyle(HandleToText,0,5,34); {set the style of the substring text to bold and shadowed}
SetTextVerticalAlign | Objects - Text |
Declaration:
PROCEDURE SetTextVerticalAlign
( TextHd :HANDLE; verticalAlignment :INTEGER ) ; Description:
Procedure SetTextVerticalAlign sets the vertical alignment of the referenced text object.
Table - Text Vertical Justification
Justification Constant Top of text box 1 Top baseline 2 Text centerline 3 Bottom baseline 3 Bottom of text box 3
Parameters:
TextHd Handle to text object. verticalAlignment Vertical alignment setting for text.
SetTextWidth | Objects - Text |
Declaration:
PROCEDURE SetTextWidth
( theText :HANDLE; widthDistance :REAL ) ; Description:
Procedure SetTextWidth Sets the text wrapping margin width of the referenced text object.
A call to SetTextWidth automatically activates text wrapping.Parameters:
theText Handle to text object. widthDistance Text wrapping margin setting for text.
SetTextWrap | Objects - Text |
Declaration:
PROCEDURE SetTextWrap
( theText :HANDLE; wrap :BOOLEAN ) ; Description:
Procedure SetTextWrap sets the text wrap mode of the referenced text object.Parameters:
theText Handle to text object. wrap Text wrap setting for text.
TextFace | Objects - Text |
Declaration:
PROCEDURE TextFace
( s:TEXTSTYLE ) ; Description:
Procedure TextFace sets the active text style of a VectorWorks document.
The text style may be one or a combination of the available styles, and should be enclosed in brackets. To specify multiple styles, each style should be separated by a comma.Parameters:
s Style setting for document. Example:
TextFace([Italic]); {set the active text style to Italic} TextFace([Bold,Outline]); {set the active text style to bold outline}
TextFlip | Objects - Text |
Declaration:
PROCEDURE TextFlip
( FlipType:INTEGER ) ; Description:
Procedure TextFlip flips newly created text vertically or horizontally. Parameter FlipType specifies the flip effect to be applied to the text.
Table - Text Flip Style
Flip Style Constant No reflection 0 Horizontal reflection thru origin 1 Vertical reflection thru origin 2
Parameters:
FlipType Text flip setting for text. Example:
TextFlip(1); CreateText('Sample text string');
TextFont | Objects - Text |
Declaration:
PROCEDURE TextFont
( fontID:INTEGER ) ; Description:
Procedure TextFont sets the active font for the document.Parameters:
fontID Font ID setting for document. Example:
TextFont(GetFontID('Times'));
TextJust | Objects - Text |
Declaration:
PROCEDURE TextJust
( justify:INTEGER ) ; Description:
Procedure TextJust sets the active text justification for a VectorWorks document.
Table - Text Justification
Justification Constant Left 1 Center 2 Right 3
Parameters:
justify Justification setting for document.
TextLeading | Objects - Text |
Declaration:
PROCEDURE TextLeading
( leading:REAL ) ; Description:
Procedure TextLeading sets the default line spacing of VectorWorks to a custom leading value (in points).Parameters:
leading Custom leading value for document.
TextOrigin | Objects - Text |
Declaration:
PROCEDURE TextOrigin
( pX :REAL; pY :REAL ) ; Description:
Procedure TextOrigin is used to specify the origin point (location) of a newly created text object.
The position of the actual text with respect to the origin is determined by the current vertical and horizontal text justification modes.
Parameters:
p Coordinates of text origin. See Also:
MoveTo
TextRotate | Objects - Text |
Declaration:
PROCEDURE TextRotate
( Rotation:REAL ) ; Description:
Procedure TextRotate sets the angle of a new text object.Parameters:
Rotation Rotation angle for text. Example:
TextRotate(45); TextOrigin(0",0"); CreateText('Rotated string');
TextSize | Objects - Text |
Declaration:
PROCEDURE TextSize
( size:REAL ) ; Description:
Procedure TextSize sets the active text size of a VectorWorks document.
Text size is specified in points(1 point = 1/72"). If 0 is specified, then the font size will default to 12 pt text.Parameters:
size Point size of text. Example:
TextSize(18); {set the active text size to 18 point}
TextSpace | Objects - Text |
Declaration:
PROCEDURE TextSpace
( spacing:INTEGER ) ; Description:
Procedure TextSpace sets the active spacing for a VectorWorks document.
Table - Text Spacing
Leading Constant Single space 2 1 1/2 space 3 Double space 4
Parameters:
spacing Spacing style for text. Example:
TextSpace(4); {set the active leading to double space}
TextVerticalAlign | Objects - Text |
Declaration:
PROCEDURE TextVerticalAlign
( verticalAlignment:INTEGER ) ; Description:
Procedure TextVerticalAlign sets the active text vertical alignment of a VectorWorks document.
Table - Text Vertical Justification
Justification Constant Top of text box 1 Top baseline 2 Text centerline 3 Bottom baseline 3 Bottom of text box 3
Parameters:
verticalAlignment Vertical alignment setting for document.