All Frameworks  Object Hierarchy  This Framework  Indexes   

RobotTask (Object)

Represents the Robot Task.

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" )
 

Method Index

CreateAfterOperation
Creates Operation as a child of Robot Task.
CreateCallTask
Creates a calltask inside a Robot Task
CreateOperation
Creates Operation as a child of Robot Task.
DeleteOperations
Deletes the required list of Operations.
GetAllOperations
Retrieves the List of Operations of Robot Task.

Methods


o 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.
oCreatedOperation
The Created Operation.
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
   
o 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
iAfterOperation
The Operation after which the required operation is to be created..
iWhere
The postion of where the task needs to be inserted Before(0) After(1)
oCreatedCallTask
The created call task
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
   
o 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.
iAfterOperation
The Operation after which the required operation is to be created. (Pass NOTHING if Reference Operation is specified)
oCreatedOperation
The Created Operation.
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
   
o Sub DeleteOperations( iOperationList)
Deletes the required list of Operations.
Parameters:
iOperationList
The list of Operations to be deleted.
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
   
o Sub GetAllOperations( oOperationList)
Retrieves the List of Operations of Robot Task.
Parameters:
oOperationList
The list of Operations
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
   

Copyright © 2003, Dassault Systèmes. All rights reserved.