Page 1 of 1

Load *.tee

Posted: Wed Feb 01, 2006 6:46 am
by 8443014
Hello, how can I load a saved *.tee file to a chart?

Posted: Wed Feb 01, 2006 1:08 pm
by narcis
Hi Thomas,

Yes, you need to use:

Code: Select all

Uses TeeStore;
LoadChartFromFile( TCustomChart( Chart1 ), 'mychart.tee' );

Posted: Wed Feb 01, 2006 1:31 pm
by 8443014
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 ?

Posted: Wed Feb 01, 2006 1:38 pm
by narcis
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?

Posted: Wed Feb 01, 2006 1:56 pm
by 8443014
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.

Posted: Wed Feb 01, 2006 3:02 pm
by narcis
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;

Posted: Wed Feb 01, 2006 3:53 pm
by 8443014
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?

Posted: Thu Feb 02, 2006 12:09 pm
by narcis
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.

Posted: Mon Feb 06, 2006 11:26 am
by narcis
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.

Posted: Mon Feb 06, 2006 2:11 pm
by 8443014
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.

Posted: Tue Feb 07, 2006 5:55 pm
by 8443014
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

Posted: Fri Feb 17, 2006 10:23 am
by narcis
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.