From HotDocs Wiki

(Redirected from HotDocs Update Catalog File)
Jump to: navigation, search

A HotDocs update catalog (.HCAT) file is an XML file that you distribute to each user of your published template set, normally when the templates are first installed. HotDocs then reads this file at regular intervals to know where it should check for updates to the template set. When updates are found, HotDocs can then download and install them automatically.

You can create a HotDocs update catalog file manually, using a text editor such as Notepad, or automatically, using COM automation. The method you choose will likely be based on the number of updates you expect to distribute and your ability to develop a custom application to create the catalog files automatically. Either way, the format of the file is the same and it must contain the following elements:

Element Description
checkinterval The number of days to wait between each update check.
enabled Indicates whether HotDocs should check for updates to the template set or not.
feedurl The URL for the update document (RSS feed) that HotDocs will check for updates to the template set.
formatversion The HotDocs update catalog file format. (Currently, the only file format is 1.)
password The password required to install HotDocs Auto-Install (.HDI) files for your template set (if applicable).
publishdate The date on which the template set was published.
title The title of the template set.
discardeditems A list of update items that have been discarded (ignored) by the user.
installeditems A list of update items that have been installed.
notinstalleditems A list of update items that have not yet been installed.


Manually Creating a Catalog File

Manually creating a HotDocs update catalog file is fairly simple. Just open a text editor such as Notepad, type the contents of the file, and save it with a .HCAT file name extension. The following example shows the contents of a typical update catalog file you would distribute to your template set users:

<?xml version="1.0"?>
<publishdate>Sun, 03 Jun 1990 00:00:00 GMT</publishdate>
<title>Hobble Creek Real Estate Forms</title>

This catalog file contains enough information to let HotDocs know the title of the template set and the URL it should use to check for updates. Once the catalog file is installed on a user's computer and updates are downloaded, the contents of this file, particularly the three lists of update items, will be updated by HotDocs to indicate which updates have been installed or discarded. As the template set publisher, however, you would only need to create the basic catalog file with empty lists of update items.

Automatically Creating a Catalog File

If you need to create many update catalog files, you may choose to write your own application that creates the files automatically. This application might prompt you for a file name and basic information about the template set (e.g., title, password, URL), and then create the file for you. Using an automated method like this can save you time whenever you need to create a new catalog file, and it can also reduce the chance of using incorrect syntax in the file.

To help you write a custom application for creating catalog files, HotDocs 2006 includes a COM type library with objects and methods you can use to easily create valid update catalog files. Here are some examples that use these objects to create a basic catalog file like the one shown above:

=====Visual Basic Example====+

 Dim hcat As New HDNETLib.UpdateCatalogClass
 'Specify the information for the catalog file
 hcat.fileName = "C:\Example.hcat"
 hcat.setTitle = "Hobble Creek Real Estate Forms"
 hcat.feedUrl = "http://www.HobbleCreek.com/update.rss"
 hcat.checkInterval = 7
 hcat.publishDate = System.DateTime.Now
 hcat.shouldUpdate = True
 'Save the catalog file
Visual C# Example
 HDNETLib.UpdateCatalogClass hcat = new 

//Specify the information for the catalog file hcat.fileName = "C:\\Example.hcat"; hcat.setTitle = "Hobble Creek Real Estate Forms"; //title hcat.feedUrl = "http://www.HobbleCreek.com/update.rss"; //feedurl hcat.checkInterval = 7; //checkinterval hcat.publishDate = System.DateTime.Now; //publishdate hcat.shouldUpdate = true; //enabled

//Save the catalog file hcat.Save();

These examples are very basic, but they illustrate the general concept of using COM automation to create HotDocs update catalog files. For more information about the methods and properties available in the HDNET object, including methods for reading and modifying existing catalog files, see Overview: Automatically Update Published Template Sets.

Distributing a Catalog File

You can distribute the update catalog file in two ways. If you publish your template set as a HotDocs Auto-Install (.HDI) file, you can include the .HCAT file in the list of additional files. When HotDocs installs the template set, it automatically copies the .HCAT file to the Catalog Files folder specified in the user's HotDocs Options (Tools > Options > File Locations > Catalog Files). You can also manually copy the .HCAT file to the user's Catalog Files folder.

CAUTION: HotDocs must have read/write access to the .HCAT file. If HotDocs cannot access the folder or catalog file, the catalog file will be ignored.