Sorry, It’s been a couple of years since I used Ignition. I’m changing the tag path for a current pen. But if I try to close and commit and save changes, when I reopen it the tag path goes back to the original.
Are you using a template for the trend? If it is the Adhoc Trending tool, it is most likely a template and you would need to change it in the template for it to load that particular tag on open.
Thanks, not a template, but it looks like they are passing in the the tags into the chart. Just have to figure out where they’re coming from. This script is on the container.
'''if event.propertyName == 'title':
title = event.source.title
dataset = event.source.dataset
pyDataset = system.dataset.toPyDataSet(dataset)
chartData =
for num in range(pyDataset.getRowCount()):
if pyDataset[num][1] == title:
chartData.append([pyDataset[num][3],pyDataset[num][4],'MinMax',pyDataset[num][5],pyDataset[num][6],1,'color(255,85,85,255)','',1,1,0,1,1,pyDataset[num][2],0,0,0,1,'',0])
chartHeaders = ["NAME","TAG_PATH","AGGREGATION_MODE","AXIS","SUBPLOT","ENABLED","COLOR","DASH_PATTERN","RENDER_STYLE","LINE_WEIGHT","SHAPE","FILL_SHAPE","LABELS","GROUP_NAME","DIGITAL","OVERRIDE_AUTOCOLOR","HIDDEN","USER_SELECTABLE","SORT_ORDER","USER_REMOVABLE"]
event.source.getComponent('Easy Chart').tagPens = system.dataset.toDataSet(chartHeaders,chartData)'''
They are coming from a dataset property on the coponent where you copied this event script:
dataset = event.source.dataset
Thanks,
I found that they were pulling all the pen information from a DB. Then just using one screen for all the trends.