#Set up the chart defaults.
default = ['DefaultName', # name
'[~]DefaultPath', # tag_path
'MinMax', # aggregation_mode
'Default Axis', # axis
1, # subplot
True, # enabled
"color(255,0,0,255)", # color
'', # dash_pattern
1, # render_style
1.0, # line_weight
0, # shape
True, # fill_shape
False, # labels
'', # group_name
False, # digital
False, # override_autocolor
False, # hidden
True, # user_selectable
None, # sort_order
False] # user_removable
tagpens = self.tagPens
for path in paths:
newrow = default
newrow[0] = path.split('/')[-1]
newrow[3] = system.tag.read("%s.EngUnit" % path).value
newrow[6] = self.autoColorList[tagpens.rowCount % len(self.autoColorList)]
tagpens = system.dataset.addRow(tagpens, tagpens.rowCount, newrow)
self.tagPens = tagpens
Absolutely possible; here’s a rudimentary implementation of onTagsDropped that will do it. The “important” line is: newrow[3] = system.tag.read("%s.EngUnit" % path).value