View Full Version : Dynamic VAR in Thumb Slider Component

February 5th, 2010, 01:32 AM
Is it possible to use a single slider thumb component to control multiple lights.

For example, setting the VAR to {CurrentLight}\Level

where CurrentLight = "computer\interface\light"


Rob H
February 5th, 2010, 05:40 AM
Do you mean you want to control multiple lights all at once with a single slider? Or just that you want to change the light that a slider controls?

February 5th, 2010, 12:09 PM
I would like to change the light that a slider controls dynamically.

The visual idea is as follows: I have a floorplan bitmap. I'd like to click on a room or a light, have a slider popup in a frame and control that light. To do this I need to be able to set the controlled variable dynamically. I can think of other ways to do this, multiple hidden popup frames, setting a level then copying it to the right variable, etc.

The easiest way would be to set a variable to the light's path when the user clicks on the light, and have the slider use that path to set the level.

February 5th, 2010, 01:03 PM
This has been discussed in a previous thread. Never did get a straight answer. However harleydude came up with a solution that I use in my personal skin. It involves adding a function to one of the core NR LUA DM files so each time an upgrade is made you have to go back in a add that function again. I wish there was a Promixis supported method to do this so it would make it easier for any others to create these types of lighting control screens.

If there is no way given that does not involve changing core LUA files then I will discuss this with harleydude and come up with a small example CCF.

Rob H
February 5th, 2010, 03:27 PM
This is pretty much how the flatstyle ccf works.

Suppose we have a NetRemote variable called LightSlider which will contain the path of the lighting device.

Call the variable on the slider <LightSlider>\Level

Add the following to your CCF's .lua file - note this is untested, but it should work providing I haven't made any typos.

local watcher
function(var, value)
if watcher then
watcher:Unregister() ;
watcher = NetRemote.RegisterVariableWatch(value .. '\\Level', DM.GetGirderInstance())

February 5th, 2010, 04:58 PM
I presume you mean something like this. I am working an example. I have the CCF worked out but have to write some documentation for it.

February 8th, 2010, 08:18 PM
Ok someone try this and see if it works and has enough information to tell you how to change it for your setup.

February 11th, 2010, 09:58 AM
Anyone try this?