cScheduledTask.SetPools Method

From ReliaWiki
Revision as of 00:20, 10 August 2018 by David J. Groebel (talk | contribs) (Created page with '{{DISPLAYTITLE:cScheduledTask.SetPools Method}}{{Template:API}}{{Template:APIBreadcrumb|.cScheduledTask}} <onlyinclude>Sets the Pool IDs and number of …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
APIWiki.png


Member of: SynthesisAPI.cScheduledTask


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

.SetCrewIDs(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 cScheduledTask
 ... 

 '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 Long
 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)