Skip to content

Latest commit

 

History

History
62 lines (48 loc) · 1.31 KB

GetPrefReal.md

File metadata and controls

62 lines (48 loc) · 1.31 KB

GetPrefReal

Description

Returns the value of a VectorWorks preference setting. Used with preference settings returning a REAL value.

A table of preference dialog items and their corresponding IDs may be found in the Scirpt Appendix.

FUNCTION GetPrefReal(prefIndex : INTEGER): REAL;
def vs.GetPrefReal(prefIndex):
    return REAL

Parameters

Name Type Description
prefIndex INTEGER Preference item index.

Remarks

Returns the status of the specified preference item. Used for preferences that return a real instead of a Boolean (see GetPref)

Examples

VectorScript

upi:= GetPrefReal(152);

Python

upi = vs.GetPrefReal(152)
BEGIN
	PushAttrs;
	recordName := GetName (recordH);
	upi := GetPrefReal (152);

recordName := GetName (recordH);
upi := GetPrefReal (152);

BEGIN {** Main ** }
	IF ResourceIsOK THEN InitConsts;
	UPI := GetPrefReal(kUPIPrefID);
import vs

# Returns the value of a VectorWorks preference setting.
prefIndex = 1

value = vs.GetPrefReal(prefIndex)
vs.Message('GetPrefReal returned: ' + str(value))

Version

Availability: from VectorWorks9.0

Category