Reset Historical Data Log file extension

Anyone know if there’s a way to reset the file extension (e.g. .H00) given to historical data log files? It’s nice to be able to export, manipulate, and then import the log back in, but every time I do this, it changes the file extension. In some of my PAC Display projects, they’re so old (and I’ve exported/imported so many times) that I’m up to .H1e Thanks!

I think you can only use something different if the name is generated in the strategy.

Thanks for the reply, philip! Can you please be a little more specific? Are you talking about this setting for File Name being set to “Automatic”. We already have it set that way:

image

I think it would have to be some sneaky way to go into the .ini files or something and reset the number of historical data logs that exist.

I was talking about using the “From strategy option”. You would build the file name string in a variable in the strategy. The strategy would be responsible for changing the file name when the date changes to replicate what the automatic option does.

1 Like

Ah, I see now. Well, that’s one solution. Seems like a lot of code to add to just perform the same task it already does by itself in Automatic mode, but with a different 3-digit extension. Boo. But then it would be the same file extension forever, which is nice.

I guess I could create a new Project, export all my windows, alarms, and historical data logs from my existing one, and import into the new one. That would reset the Historical Data Log extensions, too. Seems like a lot of work for not much gain.

No sneaky hacks from the Opto team?

No sneaky hacks from me… Anyone else?

(I would used the ‘fixed’ option. See how that goes - should be a lot less work).

My only question is why are you using the super trend historical data like that?

1 Like

Thanks, Beno! Well, we’ve been using the Automatic option for years, so that’s how the scientists are used to the data being organized, by day with rollover. If we went to the Fixed option, wouldn’t it just be one gi-normous data file? At least with the From Strategy option I could still name it with the same date format. Would just have to add the code to get the year/month/day, make a string, then push the new string at midnight. All just to keep the same file extension…

I’ll probably just tell them all to look for the new *.H## extension and deal with it. Or I could make the new engineer configure all the tags by hand in the existing data log instead of doing exports/imports. :smiley:

BTW, it’s not a super trend… just a normal Historical Data Log.

The strategy code to do what you want is not too difficult. Here is an abbreviated example I have in one of my strategies:

GetDateTime(ntDateTime);

NumberToString(ntDateTime[2], sYear);
NumberToString(ntDateTime[0], sMonth);
if(ntDateTime[0] <= 9) then
  sMonth = "0" + sMonth;
endif

NumberToString(ntDateTime[1], sDay);
if(ntDateTime[1] <= 9) then
  sDay = "0" + sDay;
endif

sLogFileName = sYear + sMonth + sDay + ".csv";