CScheduledTask.SetCrewIDs Method: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
mNo edit summary
m (Change VB.NET to .NET.)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:cScheduledTask.SetCrewIDs Method}}{{Template:API}}{{Template:APIBreadcrumb|10|.[[CScheduledTask_Class|cScheduledTask]]}}
{{DISPLAYTITLE:cScheduledTask.SetCrewIDs Method}}{{Template:API}}{{Template:APIBreadcrumb|.[[CScheduledTask_Class|cScheduledTask]]}}




<onlyinclude>Assigns crews to the task. (Alternatively, VB.NET users can use the CrewIDs() property to get or set the crew IDs.)</onlyinclude>
<onlyinclude>Assigns crews to the task. </onlyinclude>
 
 
'''Remarks''': Alternatively, .NET users can use the <code>CrewIDs()</code> property in the class to get or set the crew IDs.


== Syntax ==
== Syntax ==

Latest revision as of 21:28, 17 August 2017

APIWiki.png


Member of: SynthesisAPI.cScheduledTask


Assigns crews to the task.


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

Syntax

.SetCrewIDs(arr())

Parameters

arr()

Required. Long. An array of the numeric IDs of the crews to be assigned to the task.


Example

This example assumes that the repository contains existing crews.

VBA

 ... 

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

 'Create an array and define the crews to be assigned. For this example, 
 'assume that crew ID#2 and ID#4 are to be assigned to the task. 
 Dim myarray(1) As Long
 myarray(0) = 2
 myarray(1) = 4
 
 'Assign the crews to the task. 
 Call aTask.SetCrewIDs(myarray)