Previous Next


Creating a Graph as a .BMP, .WMF, or .JPG File

Sometimes, instead of returning an image your application, you would prefer to generate a file on disk. A web application, for example, would do this to generate a .JPG file for display in an HTML page. To put a graph in a file, you must change both the Destination and the DestinationFile properties. For example, to write a .JPG file, you could write:

With RDKApp.GraphDefaults
.Destination = RDKJPGFile
.DestinationFile = "C:\MyPath\MyFile.JPG"
End With
dist.Graph RDKCurveTypeDensity

Keep in mind that the extension of the filename (e.g. "JPG") must match the type given in the Destination property, or the graphing call will fail.