Skip to content

Latest commit

 

History

History
61 lines (50 loc) · 1.33 KB

File metadata and controls

61 lines (50 loc) · 1.33 KB

CallToolByName

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

Name Type Description
toolName STRING

Examples

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
resultOK := CallToolByName('Example');
import vs

# Similar to CallTool, but takes name rather than ID.
toolName = 'Example'

ok = vs.CallToolByName(toolName)
if ok:
    vs.Message('CallToolByName succeeded')
else:
    vs.Message('CallToolByName failed')

See Also

VS Functions:

Version

Availability: from Vectorworks 2014

Category