2 of 2 people found this helpful
00:00 of the current day can be expressed as t (today at midnight) in PI time. So you can simply set the start time of your trends to t, then each time you open it, the start date will be 00:00 of the current day. If you have a load of trends and don't want to click through each of them, this macro will do it for you.
Sub trendDate() Dim s As Symbol Dim t As trend For Each s In ThisDisplay.Symbols If s.Type = pbSymbolTrend Then Set t = s t.SetStartAndEndTime "t", "*" End If Next s End Sub
You could also call this from the Display_Open event to make sure its reset every time you open the PDI.
Private Sub Display_Open() Call trendDate End Sub
Thanks Keilan. It works.