New project document
Namespace: Autodesk.Revit.ApplicationServicesAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Syntax
| C# |
|---|
public virtual Document NewProjectDocument( string templateFileName ) |
| Visual Basic |
|---|
Public Overridable Function NewProjectDocument ( _ templateFileName As String _ ) As Document |
| Visual C++ |
|---|
public: virtual Document^ NewProjectDocument( String^ templateFileName ) |
Parameters
- templateFileName
- Type: System..::..String
The template file name.
Remarks
This command corresponds to New->Project command in the user-interface.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentException | If 'templateFileName' is nullNothingnullptra null reference (Nothing in Visual Basic) or an empty string. |
| Autodesk.Revit.Exceptions..::..InvalidOperationException | If the new project document cannot be created. |