VS:SetVSVar

From Vectorworks Developer
Jump to navigation Jump to search

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

Description

This is python only function. The function stores a python value into a named VectorScript variable.

This function work in the context when a VectorScript executes a python sub-script and allows data communication between the two languages. See VS:GetVSVar for the reverse data transfer.

This function is useful when using PythonExecute or PythonBeginContext

def vs.SetVSVar(vsName, value):
    return None

Parameters

vsName STRING The name of the VectorScript variable that will receive the provided python value.
value ANY The value that will be stored in the specified VectorScript variable. See the remarks below.

Return Value

Returns a handle to the Site Model object found.

Remarks

The supported VectorScript types are:

- REAL
- BOOLEAN
- CHAR
- INTEGER
- LONGINT
- STRING
- DYNARRAY OF CHAR -- this is treated as string

Example

See VS:PythonExecute.

Version

Availability: from Vectorworks 2014

See Also

VS:GetVSVar | VS:PythonExecute | VS:PythonBeginContext

[[VS:GetVSVar]] | [[VS:PythonExecute]] | [[VS:PythonBeginContext]]