I have a pdi file with many trends. Whenever I open it it should display the trend with the beginning time as 00:00:00 for that day for all trends.How to go about it?
I am using PI Process book 2015 ver 184.108.40.2064
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.
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", "*"
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()
Thanks Keilan. It works.
Retrieving data ...