Application.ActiveAssembly Property

[Read-only] This property returns an Assembly object representing the template currently being assembled.

You should make sure there is an active assembly before using this property to find out information about the assembly. In addition, you should use caution when manipulating the Assembly object. The state of the object should not be changed during assembly.

Syntax

HotDocs.Assembly ActiveAssembly [ get ]

Example

The following Visual C# example displays a message box with the name of the template currently being assembled or a message indicating that there is no active assembly:

public class ExampleCode
{
    static void Main()
    {
        HotDocs.Application app = new HotDocs.Application();
        HotDocs.AssemblyCollectionClass asc;
        bool bActive;
        asc = app.Assemblies;
         
        // Find out if there is an active assembly
        bActive = false;
        if (asc.Count > 0)
            for (int i = 0; i < asc.Count; i++)
                if (asc.Item(i).Status.Equals(HotDocs.HDASSEMBLYSTATUS.HDASMSTATUSASSEMBLING)) 
                    bActive = true;
         
        // Show message box
        if (bActive)
            MessageBox.Show (app.ActiveAssembly.TemplateTitle);
        else
            MessageBox.Show("There is no active assembly.");
    }
}