Page 1 of 1

Loading old *.tee files

Posted: Tue Dec 01, 2009 1:40 pm
by 10045902
Hey everyone,
I am using the *.tee format to store some measurements that I recorded using TeeChart VCL for Delphi 2007. I have been using this feature for years.
Recently I noticed that I was not able to open older *.tee Files in my newest software releases anymore. There were propably saved using a different version of TeeChart like 7 or earlier. Now I am using TeeChart 8
I can load the ones that I store with the new versions of my software.
The other way around it doesn't work either. When I start an older version of my software then it is possible to load the old *.tee files, but no chance on any new *.tee file.

When I try this using TeeChart Office I can load older as well as newer *.tee files.

The code I use to load the files is:

Code: Select all

      
  {$IFDEF CLR}
  tmp:=TCustomChart(Rec_Chart);
  LoadChartFromFile(tmp,OpenDialog.FileName);
  Chart1:=TChart(tmp);
  {$ELSE}
  LoadChartFromFile(TCustomChart(Rec_Chart),OpenDialog.FileName);
  {$ENDIF}
How do I need to change the code to load both older and newer *.tee files?
I hope someone can help me on this issue.

Re: Loading old *.tee files

Posted: Tue Dec 01, 2009 2:06 pm
by narcis
Hi Oracle,

For compatibility with older versions you can try using LoadChartFromStreamCheck setting TryReadData to true. If you have the templates in files you'll have to load them into a stream first.

Hope this helps!

Re: Loading old *.tee files

Posted: Tue Dec 01, 2009 2:19 pm
by 10045902
great. Thanks. I load the *.tee Files now like this:

Code: Select all

      tmp.LoadFromFile(OpenDialog.FileName);
      tmp.Position:=0;
      LoadChartFromStreamCheck(TCustomChart(Rec_Chart),tmp, CheckError, True);
And it works just fine :)
Thank you for your fast support