CanAddViewToSheet Method


Verifies that the view can be added to the ViewSheet.

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

Syntax

C#
public static bool CanAddViewToSheet(
	Document document,
	ElementId viewSheetId,
	ElementId viewId
)
Visual Basic
Public Shared Function CanAddViewToSheet ( _
	document As Document, _
	viewSheetId As ElementId, _
	viewId As ElementId _
) As Boolean
Visual C++
public:
static bool CanAddViewToSheet(
	Document^ document, 
	ElementId^ viewSheetId, 
	ElementId^ viewId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document in which the views reside.
viewSheetId
Type: Autodesk.Revit.DB ElementId
The ViewSheet on which the view will be placed.
viewId
Type: Autodesk.Revit.DB ElementId
The view which will be checked to see if it can be placed on the sheet.

Return Value

True if the view can be added to the ViewSheet, false otherwise.

Remarks

Schedule views are not handled by the Viewport class. Refer to [!:Autodesk::Revit::DB::ScheduleSheetInstance::Create()] for information about adding schedules to sheets.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

See Also