/ HALion Developer Resource / HALion Script / Reference /

getProgram

getProgram(index)

Description

Function to retrieve the Program object of a program in the Program Table of the plug-in instance. Before calling this function you must access the Instance object with this.program.instance. The index corresponds to the number of the slot in the Program Table where the program is set. The function returns the Program object of the program with the specified index.

Available in: Controller.

Arguments

ArgumentDescriptionValue Type
indexThe index of the slot in the Program Table where the program is set.number

Return Values

Returns the Program object of the program with the specified index.

Example

-- Print the name of the program in the third slot of the Program Table.

program = this.program.instance:getProgram(3)
print(program.name)

See also: setProgram, Program