Dynamic Linear Scale

Depending on which facility is selected the Linear Scale component is dynamically altered by swapping the datasets. The problem is that when the dataset is swapped it does not refresh to the binding. Is there a way to refresh the Linear Scale component so that it reads the binding values?

What version of Ignition do you have? As of the final release of 7.4 it updates for me.

How are you swapping the datasets? Is it bound to an expression or is it scripting?

[code]if event.source.parent.parent.visible == 1:

configds = event.source.parent.parent.parent.configdataset
trig  = configds.getValueAt(0, "numberofpumps")
if trig == 1:
	newsel = event.source.onepump
	event.source.indicators = newsel
elif trig == 2:
	newsel = event.source.twopump
	event.source.indicators = newsel
elif trig == 3:
	newsel = event.source.threepump
	event.source.indicators = newsel
elif trig == 4:
	newsel = event.source.fourpump
	event.source.indicators = newsel

version 7.4.[/code]

Where is that script? Are you sure it is firing? I mocked it up here with a propertyChange script and it worked just fine. Can you send a backup of a small example?

It swaps the dataset and binds if the dataset resides in the properties of container. It swaps but does not bind if the dataset resides in the properties of the linear scale.
joesproject_ds test window_2012-04-04_1756.proj (16.9 KB)

Ok, I see. You are switching out the indicators in scripting and you have the property bound to a cell update binding. I was missing the cell update binding when I tried it out myself. In that case you are right it won’t update until a value changes after the indicators change. You have to force an update with this:system.db.refresh(event.source.parent.getComponent('Linear Scale'), "indicators")Put that right after the code for changing the dataset.

Thanks. I’m still a little confused as to why when the dataset resides in the linear scale it does not bind, but when it resides in the container it does.

It didn’t behave that way for me. One of them had all zeros and one had some values. I think it just looked like it changed.