IsFamilyDocument

bool IsFamilyDocument(this Document doc)

Checks whether the document is a family document. Returns false if the document is null.

Parameters

  • docDocument

    The Revit document instance.

Returns: True if the document is a family document; otherwise false.

Example

Document doc = commandData.Application.ActiveUIDocument.Document;
if (doc.IsFamilyDocument())
{
TaskDialog.Show("Doc Type", "This is a family document.");
}