Change Vision Table max/min progress bar range using scripting

Using Ign 8.1 and would like to change the range (min/max) of a Vision table progress bar using a script. I need it to change dynamically when a different product is switched to in production. The min/max range is not showing up in the Column Attributes Dataset.

min/max should be in the properties of the component if i remember correctly. You should be able to bind them either to a tag or tag change event.

Hi William, i’ve tried on my end and i was able to find the property on the Column Attributes Dataset, it’s called “progressRange” but it’s in a weird string format.
Since you’ve asked for a script, this should do it:

#Get a refference to your table dataset with column atributes

columnAtributes = YourTablePath.columnAttributesData
newMax = 200 #Your new max value
newMin = 50 #Your new minimum value
columnNumber = 0 #Number of the column that's your progress bar. 0 Based.
changes = {'progressRange':
		  '<doubledimension><width>%d</width><height>%d</height></doubledimension>'%(newMin,newMax)}
YourTablePath =  system.dataset.updateRow(columnAtributes,columnNumber,changes)

You can achieve a similar result by using a cell update binding on the Column Attributes Dataset and bind it to a custom property with an expression similar to this:

 '<doubledimension><width>' +
 {Refference to your Min here} +
 '</width><height>' +
 {Refference to your Max here} +
 '</height></doubledimension>'

Thank you, I hadn’t thought of that. Best

Thank you Leonardo. I will give these ideas a try. Best