Load *.tee

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Load *.tee

Post by Thomas Klingler » Wed Feb 01, 2006 6:46 am

Hello, how can I load a saved *.tee file to a chart?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Feb 01, 2006 1:08 pm

Hi Thomas,

Yes, you need to use:

Code: Select all

Uses TeeStore;
LoadChartFromFile( TCustomChart( Chart1 ), 'mychart.tee' );
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Post by Thomas Klingler » Wed Feb 01, 2006 1:31 pm

Hello, thank you for your help, this works, but if I start it with delphi I get an exeption classe EClassNotFound with the message 'class TTeeCommander not found'

I have integred a Commander and linked on the chart.

Code: Select all

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, LMDCustomButton, LMDButton, ExtCtrls, TeeProcs, TeEngine,
  Chart,TeeStore, TeeComma, TeeEdit, TeeEditPro;
type
  TForm1 = class(TForm)
    LMDButton1: TLMDButton;
    Chart1: TChart;
    TeeCommander1: TTeeCommander;
    ChartPreviewer1: TChartPreviewer;
    procedure LMDButton1Click(Sender: TObject);

  private
    { Private-Deklarationen }


  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}


procedure TForm1.LMDButton1Click(Sender: TObject);
begin
LoadChartFromFile( TCustomChart( Chart1 ), 'E:\Programme entwickluingen\Blutd2\Ausgabe\t2.tee' );
end;
what ist the mistake ?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Feb 01, 2006 1:38 pm

Hi Thomas,

Have you checked that your Delphi points to your latest TeeChart version "Bin" and "Lib" folders at its search path (Project > Options > Directories/Conditionals > Search Path" and that those folders are on top of the search path list?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Post by Thomas Klingler » Wed Feb 01, 2006 1:56 pm

Hello, the path are on the search path if I work with the commander he will work the exeption comes only if I make loadchartformfile.

The data and the series will be loaded after the exeption correct.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Feb 01, 2006 3:02 pm

Hi Thomas,

Can you please try if the code below works for you? This works here. Please feel fry to modify it so that we can reproduce the problem here.

Code: Select all

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, TeeProcs, TeEngine, Chart, Series, TeeStore, TeeEditPro,  TeeComma, StdCtrls;

type
  TForm1 = class(TForm)
    Chart1: TChart;
    TeeCommander1: TTeeCommander;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  TeeCommander1.Panel:=Chart1;
  LoadChartfromFile(TCustomChart(Chart1),'e:\temp\chart1.tee');
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Post by Thomas Klingler » Wed Feb 01, 2006 3:53 pm

Hi this work if I write and load the file with the same chart in the same prog.
If I write the file with other prog form a dbchart the exeption comes agin the chart will save be this:

Code: Select all

SaveChartDialog(DBChart1);
Can the problem comes form the save with dbchart and load with chart?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Feb 02, 2006 12:09 pm

Hi Thomas,

No, that shouldn't be a problem as it works fine for me here. Could you please send us an example we can run "as-is" so that we can reproduce the problem here?

You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Feb 06, 2006 11:26 am

Hi Thomas,

Thanks for the .tee example file. We got a TeeCommander error when using it. You could try exporting the .tee file in text format and then edit the .tee file, remove the assigned properties to find which one is causing the problem you are having.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Post by Thomas Klingler » Mon Feb 06, 2006 2:11 pm

Hello, in the text file is an objekt TeeCommander:

Code: Select all

object TeeCommander1: TTeeCommander
    Left = 0
    Top = 0
    Width = 33
    Height = 413
    Panel = DBChart1
    Vertical = True
    Align = alLeft
    BevelOuter = bvNone
    Color = clWhite
    ParentShowHint = False
    TabOrder = 0
    Visible = False
  end
if I get this out I get no exepticon.Can the problem be that here is a deffinicion of a Teecomander at a different Point an to a DBCahrt?

If I change DBCahrt1 to Chart1 the exeptcion comes, I must get the hole object out.

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Post by Thomas Klingler » Tue Feb 07, 2006 5:55 pm

Hello, if I put the comander ot for the Prog with DbChart it will work. Why did you save the informations about the comander in the teefile ? Because with out save and load will work fine.

Best reagards Thomas

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Feb 17, 2006 10:23 am

Hi Thomas,

We haven't been able to reproduce this problem here.

You can try is setting the TTeeCommander chart to nil before exporting and assign it again when loading the .tee file.

If the problem still persists, could you please send us an example we can run "as-is" to reproduce the problem here? That example should export and import the chart so that the error can be reproduced.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply