Indexes   

ActiveTask (Object)

Represents the Active task of the resource in conjunction with a particular activity.

Role: Active Task is the object used to access and manage the active task set for all the resources assigned for the activity.
The following code snippet can be used to obtain the Active Task from the activity.
   Dim objChildActivity As Activity
   Dim objActiveActivity As ActiveTask
   
   Set objActiveActivity = objChildActivity.GetTechnologicalObject("ActiveTask")
 

Method Index

GetActiveTask
Retrieves the Active Task for an activity for a particular Resource.
SetActiveTask
Defines the Active Task for an activity for a particular Resource.

Methods


o Sub GetActiveTask( iResource,
oTask)
Retrieves the Active Task for an activity for a particular Resource.
Parameters:
iResource
The resources.
oTask
The Active Task.
Returns:
An HRESULT.
Legal values:
S_OK
The status could be successfully queried from the activity
E_FAIL
The query failed.
Example:
The following example get the active task of the particular resource in the activity.
   Dim oActiveAct As ActiveTask
   Dim iResPrgMngr As ResourceProgramManager
   Dim oTask As Task
   ..
   oActiveAct.GetActiveTask iResPrgMngr, oTask
   
o Sub SetActiveTask( iResource,
iTask)
Defines the Active Task for an activity for a particular Resource.
Parameters:
iResource
The resources that owns the Task.
iTask
The Tasks to be made active.
Returns:
An HRESULT.
Legal values:
S_OK
The Active Task was corrrectly set
E_FAIL
The Active Task was not corrrectly set
Example:
The following example sets Active Task for an activity for a particular Resource.
   Dim iActiveAct As ActiveTask
   Dim iResPrgMngr As ResourceProgramManager
   Dim iTask As Task
   ..
   oActiveAct.SetActiveTask iResPrgMngr, iTask
   

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