Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt
Panel
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

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

Bus or number

Example

Code Block
-- remove all busses from the program
   
-- find the busses in the program
busses = this.program:findBusses(true)
   
-- and remove them
for i, bus in ipairs(busses) do
    this.parent:removeBus(bus)
end

...