auto_LoadTemplate

auto_LoadTemplate opens a template.

hPage = auto_LoadTemplate(ssFileName)
hPage = auto_LoadTemplate(ssFileName, ssPageName)

Return Value

hPage is the handle of the page that was created from the template. With this handle, the functions that access the page object can be called (See example 2).

Parameters

ssFileName

ssFileName is the name of the template file. The template name can be specified without the drive and path name. In this case, the functions looks for the template in the specified automation script directories, e.g. auto_LoadTemplate("template1.ipw").

ssPageName

ssPageName is the template’s page name. If this parameter is not given, the first page from the template will be loaded.

Example

Example 1: The following example creates a copy of the first page of the file template-en.ipz.

auto_LoadTemplate(GetRootDirectory() + "template/template-en.ipz");

Example 2: In this example, the return value hPage is used to save the page as a Meta file.

hPage = auto_LoadTemplate("c:/uniplot/template/file.ipz");
PageSaveAsMetafile(hPage, "c:/test.wmf");

id-1812115