Hello,
I’m writing a script to setup some buses in a session. It also creates groups for each bus and sets some defaults and colors. But, the LUA created groups are not usable. The buses are in the group, but not really?

I cannot assign other tracks to the groups, I can drag the group over another track, but the track doesn’t actually get assigned to the group. Another scripthook doesn’t react to the track getting added to a group.
local function getRouteGroup(group)
assert(group)
print("Creating group " .. group.name)
local current_routegroup = Session:new_route_group(group.name)
current_routegroup:set_color(false)
current_routegroup:set_gain(false)
current_routegroup:set_relative(false, nil)
current_routegroup:set_hidden(false, nil)
current_routegroup:set_monitoring(false)
current_routegroup:set_mute(false)
current_routegroup:set_recenable(false)
current_routegroup:set_rgba(catppuccin[group.color])
current_routegroup:set_route_active(true)
current_routegroup:set_select(false)
current_routegroup:set_solo(false)
return current_routegroup
end
I can create another group with the same name (eg. second group “Strings”), when running the script the second group is used in the script.
What’s the correct way to create a routegroup with LUA?
Thanks and best!
Vivien
