Export Template

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Export Template

Post by AGF » Sun May 22, 2011 10:34 am

Hi,

i am using

frm.TChart1.Export.Template.IncludeData = True
frm.TChart1.Export.Template.Save(File)

to export my Charts, but when i try to load it back with

frm.TChart1.Import.Template.Load(File)

only the series are displayed, but no Data is there?

during the Export i give the File not an ten extension....


Thanks

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Export Template

Post by Sandra » Mon May 23, 2011 11:09 am

Hello AGF,

Using next code I couldn't reproduce your problem and last version of TeeChart.Net:

Code: Select all

 Steema.TeeChart.Styles.Line line1, line2;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            tChart2.Aspect.View3D = false;
            line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line2 = new Steema.TeeChart.Styles.Line(tChart2.Chart);
            line1.FillSampleValues();
            line2.FillSampleValues();
            tChart1.Dock = DockStyle.Top;
            tChart2.Dock = DockStyle.Bottom;
            tChart1.Export.Template.Save("C:\\tmp\\file1.ten");
        }

        private void button1_Click(object sender, EventArgs e)
        {
            tChart2.Import.Template.Load("C:\\tmp\\file1.ten");
        }
Could you check if you can reproduce your problem using previous code? If your problem doesn't appear in previous code, please, try to arrange a simple project because we can reproduce exactly your problem here.

On the other hand, you can tell us which version of TeeChart.Net are you using now?

Thanks
Best Regards,
Sandra Pazos / 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

AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Re: Export Template

Post by AGF » Mon May 23, 2011 8:10 pm

Dear Sandra,

i could not use these code, because i have only an vb.net devenv.

i am using teechart net 2010

i have have checked the export again - the series are included but no values inside the series List!


Thanks

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Export Template

Post by Sandra » Tue May 24, 2011 11:08 am

Hello AGF,
I think you can help you translate C# to VB.NET code and viceversa you can use one those tools:
http://carlosag.net/Tools/CodeTranslator/Default.aspx
http://www.developerfusion.com/tools/co ... arp-to-vb/

Please, try to convert my code and modified it or send us a simple project,so we can reproduce your problem here. On the other hand, tell us which version you can use, exactly for example:
Last version of TeeChart.Net
Build 4.1.2011.04193

Thanks,
Best Regards,
Sandra Pazos / 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

AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Re: Export Template

Post by AGF » Thu May 26, 2011 3:23 pm

Dear Sandra

=======================================
Release Notes 8th February 2011
TeeChart.NET version 2011
Build 4.0.2011.02083
Compiled in .NET Framework 4.0
Build 4.0.2011.02082
Compiled for Visual Studio 2008
Build 4.0.2011.02081
Compiled in .NET Framework 2.0
Build 4.0.2011.02080
Compiled in .NET Framework 1.0
=======================================

Thanks

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Export Template

Post by Sandra » Fri May 27, 2011 7:49 am

Hello ARG,

Thanks for your information. Please, update your version of TeeChart.Net that you can find in customer download page and try again my code and check if the problem persist.

Thanks,
Best Regards,
Sandra Pazos / 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

AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Re: Export Template

Post by AGF » Fri May 27, 2011 5:56 pm

Dear Sandra,

it is the same like before! I add some series and save them to an template file with the code i send you.

the (file) comes from an SaveFileDialog an i have tested the *ten and my custom extention with no success.

when i use the TEditor component for Export and Import it works well!


Thanks

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Export Template

Post by Sandra » Mon May 30, 2011 7:33 am

Hello AGF,

Can you please, send us a simple project we run as-is here, so we can reproduce exactly, your problem?


Thanks,
Best Regards,
Sandra Pazos / 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

AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Re: Export Template

Post by AGF » Wed Jun 01, 2011 4:33 am

Dear Sandra,

it is not possible to make an simple example,because i use teechart inside of an complex framework. If you provide me an email adress from to my accout e mail, i can give you more informations about that .....


Thanks

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Export Template

Post by Yeray » Wed Jun 01, 2011 7:56 am

Hello,

You could explain private details mailing to "info at steema dot com" referencing this thread.
If you want to send us private files, you could use our upload page.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Export Template

Post by Yeray » Wed Jun 01, 2011 9:44 am

Hello,

I understand that the framework you use makes it difficult for you to arrange a simple example project isolated from that framework.
However, it's difficult for us too to analyze the problem without being able to debug it, etc.

From what you said in a previous message, using a TEditor component works fine while using a SaveFileDialog doesn't, isn't it?
I'd debug it to see the exact difference between both behaviors. Doesn't SaveFileDialog give you the same string than the TEditor? Why?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Re: Export Template

Post by AGF » Sat Jun 04, 2011 11:31 am

Dear Yeray

during our work arround Import and Export we have received these error
System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Steema.TeeChart.Import.Imports.InternalFindType(String typeName, Assembly a)
bei Steema.TeeChart.Import.Imports.FindType(String typeName)
bei Steema.TeeChart.Import.Imports.DeserializeFrom(SerializationInfo info, StreamingContext context)
bei Steema.TeeChart.Chart..ctor(SerializationInfo info, StreamingContext context)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
bei System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
bei System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
bei System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
bei System.Runtime.Serialization.ObjectManager.DoFixups()
bei System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
bei System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
bei Steema.TeeChart.Import.TemplateImport.Load(Stream stream)
bei Steema.TeeChart.Import.TemplateImport.Load(String fileName)
bei....Cvo_DecrypteFile(String File, String Typ) in C:\Users\....\Documents\Visual Studio 2008\Projects\......\....Pane1.vb:Zeile 467.;
The error occurs during the import of an exported file...

Do have idea's to handle that?


Thanks

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Export Template

Post by Yeray » Mon Jun 06, 2011 8:14 am

Hello,

It sounds like if you were using some series or tool that is exported correctly but fails when trying to be imported.
Could you please send us the .ten file that is failing when trying to be imported? I see you mentioned you've customized the exportation. Is the problem also occurring when exporting&importing using unmodified TeeChart routines?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Re: Export Template

Post by AGF » Tue Jun 07, 2011 5:09 am

Dear Yeray,

i am not sure. When i use the methods from the teeEditor it works, when i try it with code it does not.

I have attached some examples...
Attachments
Daten.zip
(6.46 KiB) Downloaded 408 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Export Template

Post by Yeray » Tue Jun 07, 2011 10:07 am

Hello,

I've been testing your .ten and .cvo files. I could load all them without problems with the code below except for one: test3.ten

Code: Select all

tChart1.Import.Template.Load(fileName);
The test3.ten file seems to have 2 series and fails when trying to load the first one because for some reason the SeriesCollection is empty.
It would be helpful if you could give us more information about the chart that generated this ten file. What series types are in it? Is it possible for you to send us the code used to create and format the chart?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply