Indexes   

Task (Object)

Represents the Task of a resource.

Role: Task is the object used to access and manage the attributes of the task.
The following code snippet can be used to obtain the Task from the Resource program manager.
   Dim objResourceProgramManager As ResourceProgramManager
   Dim oTask As Task
   
   objResourceProgramManager.GetTask  "RobotTask.1", oTask
 

Method Index

GetName
Get the name of the Task
GetResource
Gets the Owning Resource
SetName
Set the name of the task

Methods


o Sub GetName( oName)
Get the name of the Task
Parameters:
oName
The user defined name of the Task.
Returns:
An HRESULT.
Legal values:
S_OK
The name of the task was corrrectly retrieved
E_FAIL
The name of the task was not corrrectly retrieved
Example:
The following example get the name of the task.
   Dim objTask As Task
   Dim strTaskName As String
   ..
   objTask.GetName strTaskName
   
o Sub GetResource( oRes)
Gets the Owning Resource
Parameters:
oRes
The Owning Resource.
Returns:
An HRESULT.
Legal values:
S_OK
The owning resource was corrrectly retrieved
E_FAIL
The owning resource was not corrrectly retrieved
Example:
The following example retrieves the owning resource of the task.
   Dim objTask As Task   
   Dim objRobot as Product
   ..
   objTask.GetResource objRobot
   
o Sub SetName( iName)
Set the name of the task
Parameters:
iName
The user defined name of the Task.
Returns:
An HRESULT.
Legal values:
S_OK
The name of the task was set corrrectly
E_FAIL
The name of the task was not set corrrectly
Example:
The following example set the name of the task.
   Dim objTask As Task     
   ..
   objTask.SetName("RobotTask.2")
   

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