vl-princ-to-string (AutoLISP)

Returns the string representation of LISP data as if it were output by the princ function

Supported Platforms: Windows and Mac OS

Signature

(vl-princ-to-string data)
data

Type: Integer, Real, String, List, ads_name, T, or nil

Any AutoLISP data.

Return Values

Type: String

A string containing the printed representation of data as if displayed by princ.

Examples

Windows
(vl-princ-to-string "abc")
"abc"

(vl-princ-to-string "c:\\acadwin")
"C:\\ACADWIN"

(vl-princ-to-string 'my-var)
"MY-VAR"
Mac OS
(vl-princ-to-string "abc")
"abc"

(vl-princ-to-string "/myutilities")
"/myutilities"

(vl-princ-to-string 'my-var)
"MY-VAR"