Page 1 of 1

INativeExport.SaveToFile return error Catastrophic Failure

Posted: Tue Mar 15, 2005 4:55 pm
by 9525450
Hi,
I upgraded a TeeChart.ocx from version 6 to 7.003 in a VB6 program. I receive then following error when I save the chart as a native TeeChart 'tee' template

Line code : tChart.Export.asNative.SaveToFile lsPathFileName, True
Error : -2147418113 Automation error Catastrophic failure

The same code work well with version 6. I'm able to save the chart as a JPEG format .

Sophie

Posted: Tue Mar 15, 2005 5:43 pm
by narcis
Hi Sophie,

It works fine here using v7.0.0.3 ActiveX in VB6. Could you please send us a project we can run "as-is" to reproduce the problem here?

You can post the sample project at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Thanks in advance.

Posted: Mon Mar 21, 2005 2:14 pm
by 9525450
Hi Narcis,
The error arrive when you call the method .RemoveAllCustom before asNative.SaveToFile

Code sample for a VB project EXE

Private Sub Form_Load()
Set loTchart = CreateObject("TeeChart.TChart.7")

With loTchart
.Axis.RemoveAllCustom

lsFichier = App.Path & "\courbe"
If Dir(lsFichier & ".tee", vbNormal) <> vbNullString Then
Kill lsFichier & ".tee"
End If
.Export.asNative.SaveToFile lsFichier, True
End With
Set loTchart = Nothing
End Sub

Sophie

Posted: Tue Mar 22, 2005 8:10 am
by narcis
Hi Sophie,

Yes, you are right. I've been able to reproduce it here and it's a bug. I've included this issue to our deffect list to be fixed for future releases.

At the moment I can't think of a workaround.