Viewport.CanAddViewToSheet Method

ViewportCanAddViewToSheet Method

Verifies that the view can be added to the ViewSheet.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static bool CanAddViewToSheet(
	Document document,
	ElementId viewSheetId,
	ElementId viewId
)
Public Shared Function CanAddViewToSheet ( 
	document As Document,
	viewSheetId As ElementId,
	viewId As ElementId
) As Boolean
public:
static bool CanAddViewToSheet(
	Document^ document, 
	ElementId^ viewSheetId, 
	ElementId^ viewId
)
static member CanAddViewToSheet : 
        document : Document * 
        viewSheetId : ElementId * 
        viewId : ElementId -> bool 

Parameters

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

Return Value

Boolean
True if the view can be added to the ViewSheet, false otherwise.
Exceptions
ExceptionCondition
ArgumentNullException A non-optional argument was null
Remarks
Schedule views are not handled by the Viewport class. Refer to [!:Autodesk::Revit::DB::ScheduleSheetInstance::Create()] for information about adding schedules to sheets.
See Also