PopulateTemplate Method
The PopulateTemplate method populates the template objects in the document with the specified worksheet and grid files. This method acts as a bulk action to assign data to all applicable objects within the document at once.
Syntax
object.PopulateTemplate( worksheetFiles, gridFiles )
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
| worksheetFiles | Variant | An array of new worksheet files to be assigned to the template document. The order of the array must correspond to the worksheet files in the Populate Template dialog. |
| gridFiles | Variant | An array of new grid files to be assigned to the template document. Use an empty string ("") if no grid files are required. |
Note: The number of worksheet and grid files specified must match the number of original files used in the template document.
Example
This example demonstrates how to populate a template document using arrays of worksheet and grid files.
'Prepare the file arrays
Dim wksFiles(0) As String
wksFiles(0) = "C:\Data\NewData.dat"
Dim gridFiles(0) As String
gridFiles(0) = "C:\Data\NewGrid.grd"
'Populate the entire template document
Plot1_Template_doc.PopulateTemplate(wksFiles, gridFiles)
Used by: Document Object