Jump to navigation Jump to search
Sets the IDs of the crews included in the team.
Remarks: Designed for VB6/VBA users, .NET users should use CrewIDs property instead.
- Required as integer. An array of the crew IDs.
VBA 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr19") 'Set the IDs for existing crews Dim CrewIDs() As Long ReDim CrewIDs(2) CrewIDs(0) = 1 CrewIDs(1) = 4 CrewIDs(2) = 5 'Create instance of TeamInfo. Dim Team1 As New TeamInfo 'Set the crew IDs for Team1. Call Team1.SetCrewIDS(CrewIDs) 'Do the same for another team. ReDim CrewIDs(3) CrewIDs(0) = 3 CrewIDs(1) = 7 CrewIDs(2) = 8 CrewIDs(3) = 9 'Create instance of TeamInfo. Dim Team2 As New TeamInfo 'Set the crew IDs for Team2. Call Team2.SetCrewIDS(CrewIDs) 'Get a particular task with ID of 2 from repository. Dim aTask As cCorrectiveTask Set aTask = MyRespository.Task.GetCorrectiveTask(2) 'Put the teams previously created into array. Dim Teams(1) As TeamInfo Set Teams(0) = Team1 Set Teams(1) = Team2 'Assign teams to the task. Call Task.SetTeams(Teams) 'Update task in repository. Call MyRepository.Task.UpdateCorrectiveTask(Task)