VS:CallToolByName

From Vectorworks Developer
Jump to navigation Jump to search

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

Description

Similar to CallTool, but takes name rather than ID. Supports plug-in tools (but not yet internal tools).

FUNCTION CallToolByName(
toolName :STRING) : BOOLEAN;
def vs.CallToolByName(toolName):
    return BOOLEAN

Parameters

toolName STRING

Example

VectorScript

Message( CallToolByName( 'Spiral' ) );
{ activates Spiral tool, returns true if successful
Note: Spiral is not an internal tool
if you try it for example with 'Wall' this will return an error, since it's an internal tool }

Python

vs.Message( vs.CallToolByIndex( 'Spiral' ) ) 
# activates Spiral tool, returns true if successful
# Note: Spiral is not an internal tool
# if you try it for example with 'Wall' this will return an error, since it's an internal tool

Version

Availability: from Vectorworks 2014

See Also

VS Functions:

VS Functions:
  • [[VS:CallTool]]
  • [[VS:CallToolByIndex]]