grandMA3 User Manual Publication
Dump (handle)

grandMA3 User Manual » Plugins » Lua Functions - Object API » Dump (handle)
Version 2.0

Description

The Dump function returns a string with information about the object, for instance, the name, class, path of the object, its properties, and children.

Arguments

  • Handle:
    The function takes a handle of the type "light_userdata" as an argument.

Often, Dump is used without an argument but is called with the colon notation for object-oriented calls. See the examples below.

Return

The function returns nothing but outputs information about the object in the Command Line History window.

Examples

These examples all print information about the selected sequence in the Command Line History.

The first example using the colon operator:

Lua
return function ()
-- Dump() is called on a function
Printf("=============== START OF DUMP ===============")
SelectedSequence():Dump()
Printf("================ END OF DUMP ================")
end

 The second example uses an argument with the same result:

Lua
return function ()
-- Dump() is called with function as an argument
Printf("=============== START OF DUMP ===============")
SelectedSequence().Dump(SelectedSequence())
Printf("================ END OF DUMP ================")
end

 The third example uses a variable with the same result:

Lua
return function ()
--Stores the handle for the selected sequence in a local variable.
local mySeqHandle = SelectedSequence()
-- Dump() is called on the variable.
Printf("=============== START OF DUMP ===============")
mySeqHandle:Dump()
Printf("================ END OF DUMP ================")
end