New family document, including family, titleblock, and annotation symbol
Namespace: Autodesk.Revit.ApplicationServicesAssembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public virtual Document NewFamilyDocument(
string templateFileName
)
Parameters
- templateFileName String
- The template file name.
Return Value
Document
Exceptions
Remarks
This command corresponds to File->New->Family.../TitleBlock.../Annotation Symbol....
Example
C#
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");
}
VB
Dim templateFileName As String = "C:\Documents and Settings\All Users\Application Data\Autodesk\RST 2010\Imperial Templates\Generic Model.rft"
Dim familyDocument As Document = application.NewFamilyDocument(templateFileName)
If familyDocument Is Nothing Then
Throw New Exception("Cannot open family document")
End If
See Also
Reference