VS:CallDynVSFunction: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
(Created page with "{{LocationMain|category=LocationVS|specific=}} __TOC__ <vwDoc> ----------------------------------------------------------------------------------------------------------- <d...")
 
No edit summary
Line 6: Line 6:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<desc>
<desc>
Procedure SysBeep uses the current system prompt sound to alert the user.
This is python only function. It calls an external function (function implemented in a Vectorworks plugin) by name.
 
</desc>
</desc>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<def>
<def>
<funcDef lang="vs">
PROCEDURE SysBeep;
</funcDef>
<funcDef lang="py">
<funcDef lang="py">
def vs.SysBeep():
def vs.CallDynVSFunction(funcName, (...params...)):
     return None
     return None
</funcDef>
</funcDef>
</def>
</def>
-----------------------------------------------------------------------------------------------------------
<params>
<lineList ident=1>
<line>
funcName
STRING
The name of the external function that will be called.
</line>
<line>
params
TUPLE
A tuple of values that represent the parameters of the called function. The number and type of parameters depends on the actual function being called.
</line>
</lineList>
</params>
-----------------------------------------------------------------------------------------------------------
<return>
Depending on the called function, the function returns:
- python 'None' -- if called PROCEDURE without VAR parameters;
- a value -- if called FUNCTION without VAR parameters;
- a tuple -- if containing the result of the FUNCTION plus the values of the VAR parameters.
</return>
-----------------------------------------------------------------------------------------------------------
<remark>
Python doesn't have concept of output parameter, so VectorScript VAR parameters are returned as part of returned tuple.
</remark>
-----------------------------------------------------------------------------------------------------------
<sample>
</sample>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------

Revision as of 18:41, 25 August 2017

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

Description

This is python only function. It calls an external function (function implemented in a Vectorworks plugin) by name.

def vs.CallDynVSFunction(funcName, (...params...)):
    return None

Parameters

funcName STRING The name of the external function that will be called.
params TUPLE A tuple of values that represent the parameters of the called function. The number and type of parameters depends on the actual function being called.

Return Value

Depending on the called function, the function returns:

- python 'None' -- if called PROCEDURE without VAR parameters;
- a value -- if called FUNCTION without VAR parameters;
- a tuple -- if containing the result of the FUNCTION plus the values of the VAR parameters.

Remarks

Python doesn't have concept of output parameter, so VectorScript VAR parameters are returned as part of returned tuple.

Version

Availability: from Vectorworks 2016