The final way to generate a graph is as an Excel formatted graph. In this case, the BDK will use Microsoft Excel as a server to generate the graph and then return the graph object to your program. There are two main benefits of graphing in Excel. First, the graphs are customizable by the end-user, using options and procedures that they are familiar with. Second, you can easily generate a composite report of simulation graphs, results, and data directly in Excel. There are, however, drawbacks to using Excel. First, it is significantly slower and takes up more resources. Second, not all of the graph customization options are available when you make an Excel format graph. Finally, we do not recommend you use Excel as a graphing engine if you are developing a web based application, because Microsoft does not support the use of Excel in such an environment.
Here's an example of how to create an Excel based graph and then manipulate the resulting Excel Chart Object in code:
Dim graphObject as Object
BDKApp.GraphDefaults.Destination = BDKExcel
Set graphObject = dist.Graph(BDKCurveTypeDensity)
graphObject.Width = 500
graphObject.Height = 1000
'etc…
The ExcelServer, ExcelServerVisible, and ExcelServerAutoClose properties of the GraphDefaults object control how the BDKX will launch, display, and close Excel. See the descriptions of these properties for more information. By default, if you do not modify these properties, the BDK will launch a visible copy of Excel for you on the first graphing call, and will shut that copy of Excel down when your application terminates.