How to access the data accessed by Easy Chart > Save button?

Hi Shreyas,

Here is the code for your first question. First it prints all the column names in tracedata. Then it prints each row in tracedata:

columns = tracedata.getColumnNames()
print columns
tracedata = system.dataset.toPyDataSet(tracedata)
for row in tracedata:
	for column in columns:
		print str(row[column])+",",
	print

The following code answers your second and third questions. Instead of getting the paths from a SQLTags folder the code gets the selected tags from the Easy Chart itself. The tagPaths variable contains a data structure that can be used by the system.tag.queryTagHistory function.

You may need to change the line of code that has the component path to the Easy Chart. If needed, change it to use the location and name that you are using for the Easy Chart in your project.

easyChart = event.source.parent.getComponent("Easy Chart")
tagPaths = []
for row in system.dataset.toPyDataSet(easyChart.tagPens):
	if row["ENABLED"] == True:
		tagPaths.append(row["TAG_PATH"])

tracedata = system.tag.queryTagHistory(tagPaths,startts,stopts)