LoadTemplateAuthKey

<< Click to Display Table of Contents >>

Navigation:  Template Functions >

LoadTemplateAuthKey

Previous pageReturn to chapter overviewNext page

This method is identical to LoadTemplate(), except that it validates the Authenticity Key which is assigned to a template by using dycodoc.

Loads a template file and creates a Template Object from it in memory.

The method returns a Template Object, which is the anchor object for the other template processing functions.

Using the VPE API, you can query the layout- and data source structure from a template. In addition you are able to perform several operations and modifications on a Template Object by code, including the assignment of values to fields (i.e. variables).

The template is logically linked to the specified VPE document and it will be removed automatically from memory when the VPE document is closed. Of course the template will be removed latest from memory when your application terminates.

method TVPETemplate VPE.LoadTemplateAuthKey(

string FileName,

long Key1,

long Key2,

long Key3,

long Key4

)

string FileName

the path and file name of the file to load

long Key1, Key2, Key3, Key4

the Authenticity Key

Returns:

The Template Object, if the template file was found, could be loaded and the Authenticity Key validation was successful, i.e. the Authenticity Key is present and checks ok.

In case of an error an exception is thrown and LastError is set.

Remarks:

In case of an error, LastError is set accordingly to the status of the load process.

 

See also:

"dycodoc Template Processing" in the Programmer's Manual

"Validating the Template Authenticity" Key in the Programmer's Manual