Set active Tool without vcHelpers class

Hi,

Is it possible to set the active tool of a robot without using the vcHelpers class?

Thanks

vcHelpers modules are Python scripts that can be found from:
C:\Program Files\Visual Components\Visual Components Premium 4.6\Python\Commands\vcHelpers
You can check how the various functions are implemented and use the APIs directly.

Ok, thanks for the hint, it’s very useful.

In Python, use motion target or motion statement. Whenever a motion target or motion statement is executed you can set what tool to use, which in turn updates current tool.

from vcScript import *

comp = getComponent()
rc = comp.getBehaviour(“Controller”)
tool = rc.Tools[-1]
target = rc.createTarget()
target.ToolName = tool.Name
rc.moveImmediate(target)

Thanks, it works like a charm