Create Method


Creates a new view for the systems analysis report.

Namespace: Autodesk.Revit.DB.Analysis
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2020.1

Syntax

C#
public static ViewSystemsAnalysisReport Create(
	Document document,
	string viewName
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	viewName As String _
) As ViewSystemsAnalysisReport
Visual C++
public:
static ViewSystemsAnalysisReport^ Create(
	Document^ document, 
	String^ viewName
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document where the view is to be created.
viewName
Type: System String
The name of the new report view.

Return Value

The newly created view instance, or a null reference ( Nothing in Visual Basic) if the operation fails.

Remarks

A report instance is typically created to request a new systems analysis. The default values include the weather file "USA_CO_Denver.Intl.AP.725650_TMY3.epw" and the workflow file "HVAC Systems Loads and Sizing.osw". Both are part of the Revit installation. The default output folder is the system TEMP folder.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException viewName cannot include prohibited characters. -or- viewName is an empty string.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions InvalidOperationException The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements).
Autodesk.Revit.Exceptions ModificationForbiddenException The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
Autodesk.Revit.Exceptions ModificationOutsideTransactionException The document has no open transaction.

See Also