VS:GetFontID

From Vectorworks Developer
Revision as of 17:16, 27 April 2008 by Root (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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


Description

Function GetFontID converts the string name of an available font to a font ID which can be passed to other VectorScript routines.
FUNCTION GetFontID(
fontName  :STRING) : INTEGER;
def vs.GetFontID(fontName):
    return INTEGER

Parameters

fontName STRING Name of installed font.

Remarks

returns -1 if the requested font is not available

Example

VectorScript

PROCEDURE Example;
VAR
str :STRING;
BEGIN
str := StrDialog('Enter the font name:', 'Arial');
AlrtDialog(Concat('The font ID is: ', GetFontID(str)));
END;
RUN(Example);

Python

def Example():
	str = vs.StrDialog('Enter the font name:', 'Arial')
	vs.AlrtDialog(vs.Concat('The font ID is: ', vs.GetFontID(str)))

Example()

Version

Availability: from VectorWorks8.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox