Indexes   

Operation (Object)

Represents an Operation.

Role: The interface is used manage the activities under an Operation and its attributes.
The following code snippet can be used to obtain an Operation from a Robot Task.
   Dim objRobotTask as RobotTask
   Dim objOperationList As Operation
   objRobotTask.GetAllOperations objOperationList
   Dim objOperation As Operation
   objOperation=objOperationList[0]
 

The Operation can also be obtained from an activity of the type Operation.
   Dim objActivity as Activity
   ...
   Dim objOperation as Operation
   Set objOperation = objActivity.GetTechnologicalObject("Operation" )
 

Method Index

CreateRobotMotion
Creates Robot Motion as a child of Operation.
GetActions
Retrieves all the Basic Actions under the operation.
GetRobotMotion
Retrieves the RobotMotion.
GetViaMode
Retrieves the via mode of the operation.
SetViaMode
Sets the Via Mode of the Operation.

Methods


o Sub CreateRobotMotion( iRefAct,
iBefore,
oTargetMotion)
Creates Robot Motion as a child of Operation. If there is an already existing RobotMotion we do not create a new one but return the handle to the existing one, else creates it at the start and link appropriately.
Parameters:
iRefAct
Reference activity After/Before which the Target Motion needs to be created.
iBefore
Created Target Motion can be Predecessor(True)/Successor(False) to Reference activity.
oTargetMotion
The created Robot Motion.
Returns:
An HRESULT.
Legal values:
S_OK
The Robot Motion could be successfully created
E_FAIL
The Robot Motion could not be created.
Example:
The following example creates a robot motion as a child of Operation.
   Dim objOperation As Operation
   Dim objRefAct as AnyObject
   Dim objRobotmotion as RobotMotion
   objOperation.CreateRobotMotion objRefAct,1,objRobotmotion
   
o Sub GetActions( oChildrenList)
Retrieves all the Basic Actions under the operation.
Parameters:
oChildrenList
Returns the Basic Actions of the Robot
Returns:
An HRESULT.
Legal values:
S_OK
The actions could be successfully queried
E_FAIL
The actions could not be queried.
Example:
The following example gets the actions of the current Operation.
   Dim objOperation As Operation
   Dim ActionList(2)
   objOperation.GetActions ActionList
   
o Sub GetRobotMotion( oRobotTargetMotion)
Retrieves the RobotMotion.
Parameters:
oRobotTargetMotion
Returned RobotMotion
Returns:
An HRESULT.
Legal values:
S_OK
The Robot Motion could be successfully queried
E_FAIL
The Robot Motion could not be queried.
Example:
The following example gets the robot motion of the current Operation.
   Dim objOperation As Operation
   Dim objRobotmotion as RobotMotion
   objOperation.GetRobotMotion objRobotmotion
   
o Sub GetViaMode( index)
Retrieves the via mode of the operation.
Parameters:
index
The Via Mode (1 if the target is a via point and 0 if the Target is Untyped (process)).
Returns:
An HRESULT.
Legal values:
S_OK
The via mode was successfully queried.
E_FAIL
The via mode could not be queried.
Example:
The following example retrieves the Via Mode of the Operation.
   Dim objOperation As Operation
   Dim ViaMode
   objOperation.GetViaMode ViaMode
   
o Sub SetViaMode( index)
Sets the Via Mode of the Operation.
Parameters:
index
The Via Mode (1 if the target is a via point and 0 if the Target is Untyped (process)).
Returns:
An HRESULT.
Legal values:
S_OK
The via mode was successfully set.
E_FAIL
The via mode could not be set.
Example:
The following example sets the Via Mode of the Operation.
   Dim objOperation As Operation
   objOperation.SetViaMode 0
   

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