Role: The interface is used manage activities under a Robot Task.
The following code snippet can be used to obtain the Robot Task from a Robot Task Factory.
Dim objRobotTaskFactory As RobotTaskFactory
Dim objRobot As Product
...
Set objRobotTaskFactory = objRobot.GetTechnologicalObject("RobotTaskFactory" )
Dim objRobotTaskList(3) as RobotTask
Dim objRobotTask as RobotTask
objRobotTaskFactory.GetAllRobotTasks objRobotTaskList
objRobotTask=objRobotTaskList[0]
The Robot Task can also be obtained from an activity of the type RobotTask.
Dim objActivity as Activity
...
Dim objRobotTask as RobotTask
Set objRobotTask = objActivity.GetTechnologicalObject("RobotTask" )
Methods
- Sub CreateAfterOperation( iAfterOperation, oCreatedOperation)
-
Creates Operation as a child of Robot Task.
- Parameters:
-
- iAfterOperation
- The Operation after which the required operation is to be created. dd>
- oCreatedOperation
- The Created Operation. dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The operation was successfully created.
- E_FAIL
- The operation could not be created.
- Example:
- The following example creates an Operation
Dim objRobotTask as RobotTask Dim objAfterOperation As Operation ... Dim objOperation As Operation objRobotTask.CreateAfterOperation objAfterOperation,objOperation
- Sub CreateCallTask( iRobotTask, iAfterOperation, iWhere, oCreatedCallTask)
-
Creates a calltask inside a Robot Task
- Parameters:
-
- iRobotTask
- The task to be called in the current robot task dd>
- iAfterOperation
- The Operation after which the required operation is to be created.. dd>
- iWhere
- The postion of where the task needs to be inserted Before(0) After(1) dd>
- oCreatedCallTask
- The created call task dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The call task was successfully created.
- E_FAIL
- The call task could not be created.
- Example:
- The following example creates An Operation
Dim objRobotTask as RobotTask Dim objCalledTask as RobotTask Dim objAfterOperation as Operation .. Dim objCallTaskAct as AnyObject objRobotTask.CreateCallTask objCalledTask,objAfterOperation,1,objCallTaskAct
- Sub CreateOperation( iReferenceOperation, iAfterOperation, oCreatedOperation)
-
Creates Operation as a child of Robot Task.
- Parameters:
-
- iReferenceOperation
- The Reference Operation after which the Operation has to be created and whose properties will be copied to the created operation. dd>
- iAfterOperation
- The Operation after which the required operation is to be created. (Pass NOTHING if Reference Operation is specified) dd>
- oCreatedOperation
- The Created Operation. dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The operation was successfully created.
- E_FAIL
- The operation could not be created.
- Example:
- The following example creates an Operation
Dim objRobotTask as RobotTask Dim objRefOperation as Operation ... Dim objAfterOperation as Operation Set objAfterOperation = Nothing Dim objOperation As Operation objRobotTask.CreateOperation objRefOperation,objAfterOperation,objOperation
- Sub DeleteOperations( iOperationList)
-
Deletes the required list of Operations.
- Parameters:
-
- iOperationList
- The list of Operations to be deleted. dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The operation list was successfully deleted.
- E_FAIL
- The operation list could not be created.
- Example:
- The following example creates an Operation
Dim objRobotTask as RobotTask Dim objOperationList as Operation ... objRobotTask.DeleteOperations objOperationList
- Sub GetAllOperations( oOperationList)
-
Retrieves the List of Operations of Robot Task.
- Parameters:
-
- oOperationList
- The list of Operations dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The operation list was successfully queried.
- E_FAIL
- The operation list could not be queried.
- Example:
- The following example creates An Operation
Dim objRobotTask as RobotTask Dim objOperationList As Operation ... objRobotTask.GetAllOperations objOperationList