Application.getDefaultPath Method

This method returns the default path HotDocs uses for the specified file type. You can use this method to determine the default path for any type of file in the HDDirectory enumeration.

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

Syntax

string GetDefaultPath ( HotDocs.HDDirectory directory, bool bRecent )

Parameters Description
directory This is a value corresponding to the default folder for the desired file type.
bRecent This indicates whether you want to use the default path (false) or the most recently used path (true) for the type of file indicated in the first parameter.

Return Value

The default path HotDocs uses for the specified file type.

Example

The following Visual C# example loops through each item in the HDDirectory enumeration and displays a message box with the default and most recently used paths for that file type:

public class ExampleCode
{
    static void Main()
    {
        HotDocs.Application app = new HotDocs.Application();
        string msg;
         
        foreach (HotDocs.HDDirectory item in Enum.GetValues(typeof(HotDocs.HDDirectory)))
        {
            msg = item.ToString() + ":\r\n";
            msg += app.GetDefaultPath(item, false) + "\r\n";
            msg += app.GetDefaultPath(item, true) + "\r\n";
            MessageBox.Show(msg);
        }
    }
}