Application New |
New family document, including family, titleblock, and annotation symbol
Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)


Exception | Condition |
---|---|
ArgumentException | If 'templateFileName' is or an empty string. |
InvalidOperationException | If the new family document cannot be created. |

This command corresponds to File->New->Family.../TitleBlock.../Annotation Symbol....

// create a new family document using Generic Model.rft template
string templateFileName = @"C:\Documents and Settings\All Users\Application Data\Autodesk\RST 2010\Imperial Templates\Generic Model.rft";
Document familyDocument = application.NewFamilyDocument(templateFileName);
if (null == familyDocument)
{
throw new Exception("Cannot open family document");
}
