VS:CallDynVSFunction: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
No edit summary
Line 37: Line 37:
<return>
<return>
Depending on the called function, the function returns:
Depending on the called function, the function returns:
- python 'None' -- if called PROCEDURE without VAR parameters;
:- python 'None' -- if called PROCEDURE without VAR parameters;
- a value -- if called FUNCTION 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.  
:- a tuple -- if containing the result of the FUNCTION plus the values of the VAR parameters.  
</return>
</return>



Revision as of 18:43, 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