/ HALion Developer Resource / HALion Script / Reference /

removeBus

removeBus(busOrPosition)

Description

Function to remove a bus from the specified layer. For example, this.parent specifies the parent layer of the script module as the layer that contains the bus. The bus to be removed is determined by its Bus object or its position. You can use getBus or findBusses to determine the Bus object. The position is the number that indexes the busses in the specified layer.

Available in: Controller.

Arguments

ArgumentDescriptionValue Type
busOrPositionThe Bus object or the position of the bus to be removed.Bus or number

Example

-- Remove all busses from the program.
    
busses = this.program:findBusses(true)

for i, bus in ipairs(busses) do
    this.parent:removeBus(bus)
end

See also: removeEffect, removeLayer, removeMidiModule, removeZone, Bus