Viewport.CanAddViewToSheet
Method
Description:
Verifies that the view can be added to the ViewSheet.
Verifies that the view can be added to the ViewSheet.
Remarks:
Schedule views are not handled by the Viewport class. Refer to [!:Autodesk::Revit::DB::ScheduleSheetInstance::Create()] for information about adding schedules to sheets.
Schedule views are not handled by the Viewport class. Refer to [!:Autodesk::Revit::DB::ScheduleSheetInstance::Create()] for information about adding schedules to sheets.
Syntax
public static bool CanAddViewToSheet(
Document document,
ElementId viewSheetId,
ElementId viewId
)
Parameters
| Parameter | Type | Description |
|---|---|---|
| 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
| Type | Description |
|---|---|
| Boolean | True if the view can be added to the ViewSheet, false otherwise. |
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | A non-optional argument was null |