Cell binding using indirect tag / change dataset by scripting

This is more of a python question than an Ignition question.... but something like this:

AxesDataset = [path to trend].axes
MinScale = system.tag.read([path to tag]).value
MaxScale = system.tag.read([path to tag]).value
AxesDataset = system.dataset.SetValue(AxesDataset,[row],'lower_bound', MinScale)
AxesDataset = system.dataset.SetValue(AxesDataset,[row],'upper_bound', MaxScale)
[path to trend].axes = AxesDataset

The best way to do this is to use a custom property as an intermediate value, of the correct datatype, with an indirect tag binding. That's exactly what indirect tag bindings exist for. The indirect binding takes your string as a tag path (or combines it to produce a tag path), and delivers that tag's value. Then use that custom property in your cell binding.

Consider taking a couple weeks to go through Inductive University. That'll greatly cut down on not knowing what is possible with Ignition.

2 Likes