As Question, how can I change it with VBA coding?
Editing the data set should be fairly straightforward:
Private Sub ChangeDataset()
Dim MyDatasets As Datasets
Dim MyDataset As PIExpressionDataset
Set MyDatasets = ThisDisplay.Datasets
Set MyDataset = MyDatasets.GetDataset("UPPER LIMIT")
MyDataset.Expression = "<new value>"
By the way, what is your end goal for changing the data set? Maybe there might be a better way to implement it so that you do not need code to change it at all.
Hi Gavin Chen,
Thanks for you coding. My only goal is using using a form(user can select 1 of 32 units show in the form). When user click one of them, I will read the ini file to make different limit for different unit, and then open a common trend to show a limit line in trend.
Retrieving data ...