LUA Preset Name Capture

  • Hi All,


    I'm looking for a way of capturing a presets name or preset number x.y via LUA.

    GLADs IntelliVars does the exact "Capture" feature that I'm after although thats only for MA2.


    Does anyone know of a way to store the preset current destination "name" as a variable within MA3?


    Many thanks,

    Morgan

  • Hi Andreas,


    Is it possible to get the preset type stored as a variable also? (for example Dimmer)

    In your previous example the current destination Preset Type isn't in the string.


    Code: commandline variable from the name of current destination example
    1. CD Preset 1.2
    2. Lua "SetVar(UserVars(),'TheName', CmdObj().Destination.Name)"
    3. CD Root
    4. Label Cue 1 $"TheName"
  • Either of these should do the job:

    Code
    1. CD Preset 1.2
    2. Lua "SetVar(UserVars(),'TheName', CmdObj().Destination.Name)"
    3. CD ..
    4. Lua "SetVar(UserVars(),'ThePoolName', CmdObj().Destination.Name)"
    5. CD Root
    Code
    1. CD Preset 1.2
    2. Lua "SetVar(UserVars(),'TheName', CmdObj().Destination.Name)"
    3. Lua "SetVar(UserVars(),'ThePoolName', CmdObj().Destination:Parent().Name)"
    4. CD Root