VS:GetVSVar: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{LocationMain|category=LocationVS|specific=}} __TOC__ <vwDoc> ----------------------------------------------------------------------------------------------------------- <d...") |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<desc> | <desc> | ||
This is python only function. The function stores a named VectorScript variable value into the python 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:SetVSVar]] for the reverse data transfer. | |||
This function is useful when using [[VS:PythonExecute|PythonExecute]] or [[VS:PythonBeginContext|PythonBeginContext]] | |||
</desc> | </desc> | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<def> | <def> | ||
<funcDef lang="py"> | <funcDef lang="py"> | ||
def vs. | def vs.GetVSVar(vsName): | ||
return | return Any | ||
</funcDef> | </funcDef> | ||
</def> | </def> | ||
----------------------------------------------------------------------------------------------------------- | |||
<params> | |||
<lineList ident=1> | |||
<line> | |||
vsName | |||
STRING | |||
The name of the VectorScript variable that will provide the value to be returned. | |||
</line> | |||
</lineList> | |||
</params> | |||
----------------------------------------------------------------------------------------------------------- | |||
<return> | |||
Returns the value of the named VectorScript variable. The type will depend on the actual variable. See the remarks of [[VS:SetVSVar]] for more info. | |||
</return> | |||
----------------------------------------------------------------------------------------------------------- | |||
<remark> | |||
</remark> | |||
----------------------------------------------------------------------------------------------------------- | |||
<sample> | |||
See [[VS:PythonExecute]]. | |||
</sample> | |||
----------------------------------------------------------------------------------------------------------- | |||
<seeAlso> | |||
[[VS:SetVSVar]] | [[VS:PythonExecute]] | [[VS:PythonBeginContext]] | |||
</seeAlso> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<version> | <version> | ||
Availability: from | Availability: from Vectorworks 2014 | ||
</version> | </version> | ||
Line 29: | Line 62: | ||
</vwDoc> | </vwDoc> | ||
[[Category:VS Function Reference| | [[Category:VS Function Reference|GetVSVar]] | ||
[[Category:VS Function Reference:Python Utility| | [[Category:VS Function Reference:Python Utility|GetVSVar]] |
Latest revision as of 19:01, 25 August 2017
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
This is python only function. The function stores a named VectorScript variable value into the python 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:SetVSVar for the reverse data transfer.
This function is useful when using PythonExecute or PythonBeginContext
def vs.GetVSVar(vsName): return Any
Parameters
vsName STRING The name of the VectorScript variable that will provide the value to be returned.
Return Value
Returns the value of the named VectorScript variable. The type will depend on the actual variable. See the remarks of VS:SetVSVar for more info.
Example
See VS:PythonExecute.
Version
Availability: from Vectorworks 2014
See Also
VS:SetVSVar | VS:PythonExecute | VS:PythonBeginContext
[[VS:SetVSVar]] | [[VS:PythonExecute]] | [[VS:PythonBeginContext]]