CCorrectiveTask.GetPools Method: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with '{{DISPLAYTITLE:cCorrectiveTask.GetCrewIDs Method}}{{Template:API}}{{Template:APIBreadcrumb|.cCorrectiveTask}} <onlyinclude>Returns an array of the Poo…')
 
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:cCorrectiveTask.GetCrewIDs Method}}{{Template:API}}{{Template:APIBreadcrumb|.[[CCorrectiveTask_Class|cCorrectiveTask]]}}
{{DISPLAYTITLE:cCorrectiveTask.GetPools Method}}{{Template:API}}{{Template:APIBreadcrumb|.[[CCorrectiveTask_Class|cCorrectiveTask]]}}




Line 25: Line 25:
   
   
  {{APIComment|'Get the IDs of the crews assigned to the task.}}
  {{APIComment|'Get the IDs of the crews assigned to the task.}}
   {{APIPrefix|Dim}} myarray() {{APIPrefix|As Long}}
   {{APIPrefix|Dim}} myarray() {{APIPrefix|As PoolInfo}}
   {{APIPrefix|Call}} aTask.GetCrewIDs(myarray)
   {{APIPrefix|Call}} aTask.GetPools(myarray)
   
   
  {{APIComment|'Sample output.}}
  {{APIComment|'Sample output.}}
Line 37: Line 37:
   
   
   {{APIPrefix|For}} i = lower {{APIPrefix|To}} upper
   {{APIPrefix|For}} i = lower {{APIPrefix|To}} upper
   MsgBox (myarray(i))
   MsgBox "Pool ID = " & myarray(i).ID &". Number of Parts = " & myarray(i).NumParts
   {{APIPrefix|Next}} i
   {{APIPrefix|Next}} i

Revision as of 00:01, 10 August 2018

APIWiki.png


Member of: SynthesisAPI.cCorrectiveTask


Returns an array of 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 Pools IDs and number of parts.

Syntax

.GetPools(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

VBA

 ... 

 'Add code to get an existing corrective task. 
 Dim aTask As cCorrectiveTask
 ... 

 'Get the IDs of the crews assigned to the task. 
 Dim myarray() As PoolInfo
 Call aTask.GetPools(myarray)

 'Sample output. 
 Dim i As Integer
 Dim upper As Integer
 Dim lower As Integer

 lower = LBound(myarray)
 upper = UBound(myarray)

 For i = lower To upper
  MsgBox "Pool ID = " & myarray(i).ID &". Number of Parts = " & myarray(i).NumParts
 Next i