Role: Robot Clone Task Factory is the object used to clone robot tasks.
The following code snippet can be used to obtain the Robot Task Factory from the robot product.
Dim objRobotTaskFactory As RobotTaskCloneFactory
Dim objRobot As Product
...
Set objRobotTaskCloneFactory = objRobot.GetTechnologicalObject("RobotTaskCloneFactory" )
Methods
- Sub CloneTaskInAnotherRobot( iSrcRobotTask, iDestRobot, iTargetTaskName, iTransOnTarget, oClonedRobotTask)
-
Clones a given Robot Task with in another robot.
- Parameters:
-
- iSrcRobotTask
- The Robot task that needs to be cloned. dd>
- iTargetTaskName
- The name for the cloned robot task. dd>
- iTargetTaskName
- The transformation that needs to be applied on the targets (w.r.t the robot). dd>
- oClonedRobotTask
- The resultant cloned robot task. dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The Robot Task cloning was successful.
- E_FAIL
- The Robot Task cloning was unsuccessful.
- Example:
- The following example show how to clone a task.
Dim objRobotTaskCloneFactory As RobotTaskCloneFactory Dim iSrcTask, oClonedTask Dim iTargetRobot Dim iTrans(0 to 11) .. objRobotTaskCloneFactory.CloneTaskInAnotherRobot oSrcTask, iTargetRobot, "Task.1", oTrans, oClonedTask
- Sub CloneTaskInSameRobot( iSrcRobotTask, iTargetTaskName, iTransOnTarget, oClonedRobotTask)
-
Clones a given Robot Task with in the same robot.
- Parameters:
-
- iSrcRobotTask
- The Robot task that needs to be cloned. dd>
- iTargetTaskName
- The name for the cloned robot task. dd>
- oClonedRobotTask
- The resultant cloned robot task. dd>
- iTargetTaskName
- The transformation that needs to be applied on the targets (w.r.t the robot). dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The Robot Task cloning was successful.
- E_FAIL
- The Robot Task cloning was unsuccessful.
- Example:
- The following example show how to clone a task.
Dim objRobotTaskCloneFactory As RobotTaskCloneFactory Dim iSrcTask, oClonedTask Dim iTrans(0 to 11) .. objRobotTaskCloneFactory.CloneTaskInSameRobot iSrcTask, "Task.1", iTrans, oClonedTask