Role: Robot Task Factory is the object used to create robot tasks.
The following code snippet can be used to obtain the Robot Task Factory from the robot product.
Dim objRobotTaskFactory As RobotTaskFactory
Dim objRobot As Product
...
Set objRobotTaskFactory = objRobot.GetTechnologicalObject("RobotTaskFactory" )
Methods
- Sub CreateRobotTask( iName, oRobotTask)
-
Creates a Robot Task
- Parameters:
-
- iName
- The Robot Task Name. dd>
- oRobotTask
- The Created Robot Task. dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The Robot Task was successfully created.
- E_FAIL
- The Robot Task creation failed.
- Example:
- The following example creates a robot task for a robot.
Dim objRobotTaskFactory As RobotTaskFactory Dim objRobotTask as RobotTask .. objRobotTaskFactory.CreateRobotTask "New_RobotTask_1",objRobotTask
- Sub DeleteRobotTask( iRobotTask)
-
Removes the required Robot Task.
- Parameters:
-
- iRobotTask
- The Robot Task to be Removed. dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The Robot Task could be successfully deleted.
- E_FAIL
- The deletion of Robot Task failed.
- Example:
- The following example deleted a robot task of a robot.
Dim objRobotTaskFactory As RobotTaskFactory Dim objRobotTask as RobotTask .. objRobotTaskFactory.DeleteRobotTask objRobotTask
- Sub GetAllRobotTasks( oRobotTaskList)
-
Retrieves the list of Robot Tasks owned by a Robot.
- Parameters:
-
- oRobotTaskList
- The Robot Task List. dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The Robot Task List could be successfully queried.
- E_FAIL
- The Robot Task List could not be retrieved.
- Example:
- The following example Retrieves the list of Robot Tasks for the Robot.
Dim objRobotTaskFactory As RobotTaskFactory Dim objRobotTask(3) as RobotTask .. objRobotTaskFactory.GetAllRobotTasks objRobotTask