Returns the value of a VectorWorks preference setting. Used with preference settings returning a STRING value.
A table of preference dialog items and their corresponding IDs may be found in the Scirpt Appendix.
FUNCTION GetPrefString(prefIndex : INTEGER): STRING;def vs.GetPrefString(prefIndex):
return STRING| Name | Type | Description |
|---|---|---|
| prefIndex | INTEGER | Preference item index. |
Returns the status of the specified preference item. Used for preferences that return a string instead of a Boolean (see GetPref)
unitmark:=GetPrefString(154);unitmark = vs.GetPrefString(154){save the current text style, and font of the doc in order to restore them after the creation of the new callout}
oldDocFontName := GetPrefString(100);
oldDocFontStyle := GetPrefInt(58);
BEGIN
gHtUnitStr := GetPrefString(154);
IF gHtUnitStr='"' THEN gHtUnitStr:= ' in';
nomht := Concat(ht);{Num2StrF(PCustom_Height)}
END;
CASE GetPrefInt (170) OF
1, 2: um := GetPluginString (5001);
3 : um := GetPluginString (5002);
OTHERWISE um := GetPrefString (154);
END;import vs
# Returns the value of a VectorWorks preference setting.
prefIndex = 1
text = vs.GetPrefString(prefIndex)
vs.Message('GetPrefString returned: ' + str(text))Availability: from VectorWorks9.0