I looked at the script file as suggested to try to get an image saved in VB. I came up with the following sub routine which gives me the error message
'the requested file type is not supported'
In the help for the AvFileLoader it says
'Although you can load files in a number of file formats, you can save files in XML and HDF5 formats only'
which explains the error message.
I'm thus confused about how your script in the demos directory would thus work.
Can I or can I not save an image to a file? If so, how?
Sub PrintImage(myroot As IAvGroup) Dim nWidth As Long Dim nHeight As Long Dim graphpath As String Dim filename As String Dim saveparams As String Dim fileloader As AvFileLoader Dim graph As IAvGraph2D Set fileloader = CreateObject("Avis.AvFileLoader") Set graph = myroot.Graphs(1) graphpath = "graph:/" & graph.Name filename = "C:" & graph.Name & ".png" nHeight = 400 nWidth = 500 If graph.FixedAspect Then nHeight = nWidth / graph.AspectRatio Else nHeight = nWidth * 0.6 End If saveparams = filename & "?GRAPHPATH:" & graphpath & "?WIDTH:" & CInt(nWidth) & "?HEIGHT:" & CInt(nHeight) Call fileloader.SaveAs(myroot, saveparams, False) Set fileloader = Nothing Set graph = Nothing End Sub