cCorrectiveTask.SetPools Method

From ReliaWiki
Revision as of 17:02, 4 May 2020 by David J. Groebel (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
APIWiki.png


Member of: SynthesisAPI.cCorrectiveTask


Sets the Pool IDs and number of parts for all pools required for the task.


Remarks: Alternatively, .NET users can use the Pools() property in the class to get or set the crew IDs.

Syntax

.SetPools(ByRef arr())

Parameters

arr()

Required as PoolInfo. An array of the Pool IDs and the number of parts for all pools required for the task.


Example

This example assumes that the repository contains existing pools.

VBA

 ... 

 'Add code to create a new task or get an existing task. 
 Dim aTask As cCorrectiveTask
 ... 

 'Create an array and define the pools to be assigned. For this example, 
 'assume that Pool ID#2 and ID#4 are to be assigned to the task with 3 and 5 parts, respectively. 
 Dim myarray(1) As PoolInfo
 myarray(0).ID = 2
 myarray(0).NumParts = 3
 myarray(1).ID = 4
 myarray(1).NumParts = 5
 
 'Assign the pools to the task. 
 Call aTask.SetPools(myarray)