PopulateTemplate Method (Object)
The PopulateTemplate method populates a specific template object with worksheet data. This allows for fine-tuned control over individual objects within a template document.
Syntax
object.PopulateTemplate( dataFile, dataInRows )
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
| dataFile | String | The new data file to be assigned to the object. |
| dataInRows | Variant | (Optional) Set to True to specify the "Data in rows" option. Default is False. This parameter only applies to AutoPlot, AutoPieChart, AutoRadarGraph, AutoAxisTickLabels, and AutoAxisGrid objects. |
Example
The following example demonstrates how to populate a specific line plot within a template.
'Define object pointer for a specific plot in the template
Set LinePlot = Plot1_Template_doc.Shapes.Item(1)
'Populate the plot with a new data file
LinePlot.PopulateTemplate("C:\Program Files\Golden Software\Grapher\Samples\Bar Chart.dat", False)
Used by: AutoPlot, AutoPieChart, AutoRadarGraph, AutoAxisTickLabels, AutoAxisGrid, AutoMText, AutoAxisTitle, AutoGraphTitle, and AutoScaleTitle objects.