Application.ResolveReferencePath Method

This method converts a reference path to a full file system path. For example, if you use SelectTemplate2 to get the path of a selected template that includes a reference path (e.g., ^PUBTest\template.rtf), this method can look up the reference path keyword and return a full path (e.g., C:\HotDocs\Templates\template.rtf).

This method was introduced with the release of HotDocs 2005 SP2.

Syntax

string ResolveReferencePath ( string referencePath )

Parameters Description
referencePath A file path containing a reference path keyword (e.g., ^PUBTest\template.rtf).

Return Value

A full file path for the referenced template.

Example

The following Visual C# example allows the user to select a template and then it displays the unresolved and resolved reference paths.

public class ExampleCode
{
    static void Main()
    {
        HotDocs.Application app = new HotDocs.Application();
        string tplPath, tplTitle, tplDesc;
         
        app.SelectTemplate2(@"C:\Documents\HotDocs\Libraries\MyLibrary.hdl", true, false, out tplPath, out tplTitle, out tplDesc);
         
        MessageBox.Show(tplPath); //Unresolved path
        tplPath = app.ResolveReferencePath(tplPath);
        MessageBox.Show(tplPath); //Resolved path
    }
}