TeamInfo.GetCrewIDs Method: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 17: Line 17:
  '''VBA'''
  '''VBA'''
  {{APIComment|...}}
  {{APIComment|...}}
  {{APIComment|'Add code to get an existing team.}}
  {{APIComment|'Add code to get an existing team.}}
  {{APIPrefix|Dim}} aTeam {{APIPrefix|As}} TeamInfo
  {{APIPrefix|Dim}} aTeam {{APIPrefix|As}} TeamInfo
  {{APIComment|...}}
  {{APIComment|...}}
   
   
  {{APIComment|'Get the IDs of the crews assigned to the team.}}
  {{APIComment|'Get the IDs of the crews assigned to the team.}}
  {{APIPrefix|Dim}} myarray() {{APIPrefix|As integer}}
  {{APIPrefix|Dim}} myarray() {{APIPrefix|As integer}}
  {{APIPrefix|Call}} aTeam.GetCrewIDs(myarray)
  {{APIPrefix|Call}} aTeam.GetCrewIDs(myarray)
   
   
  {{APIComment|'Sample output.}}
  {{APIComment|'Sample output.}}
  {{APIPrefix|Dim}} i {{APIPrefix|As Integer}}
  {{APIPrefix|Dim}} i {{APIPrefix|As Integer}}
  {{APIPrefix|Dim}} upper {{APIPrefix|As Integer}}
  {{APIPrefix|Dim}} upper {{APIPrefix|As Integer}}
  {{APIPrefix|Dim}} lower {{APIPrefix|As Integer}}
  {{APIPrefix|Dim}} lower {{APIPrefix|As Integer}}
   
   
  lower = {{APIPrefix|LBound}}(myarray)
  upper = {{APIPrefix|UBound}}(myarray)
  upper = {{APIPrefix|UBound}}(myarray)
   
   
  {{APIPrefix|For}} i = lower {{APIPrefix|To}} upper
  {{APIPrefix|For}} i = 0 {{APIPrefix|To}} upper
  MsgBox "Crew ID = " & myarray(i)
    MsgBox "Crew ID = " & myarray(i)
  {{APIPrefix|Next}} i
  {{APIPrefix|Next}} i

Latest revision as of 16:13, 13 March 2019

APIWiki.png


Member of: SynthesisAPI.TeamInfo


Returns an array of the IDs of the crews included in the team.


Remarks: Designed for VB6/VBA users, .NET users should use CrewIDs property instead.

Syntax

.GetCrewIDs(ByRef arr())

Parameters

arr()

Required as integer. An array of the crew IDs.

Example

VBA
 ... 

 'Add code to get an existing team. 
  Dim aTeam As TeamInfo

 ... 

 'Get the IDs of the crews assigned to the team. 
  Dim myarray() As integer
  Call aTeam.GetCrewIDs(myarray)

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

  upper = UBound(myarray)

  For i = 0 To upper
    MsgBox "Crew ID = " & myarray(i)
  Next i