ViewSheet Class


Class for ViewSheet

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public class ViewSheet : View
Visual Basic
Public Class ViewSheet _
	Inherits View
Visual C++
public ref class ViewSheet : public View

Examples

Copy C#
private void Getinfo_ViewSheet(ViewSheet viewSheet)
{
    string message = "ViewSheet: ";
    //Get the number of the Sheet
    string sheetNumber = viewSheet.SheetNumber;
    message += "\nSheet Number: " + sheetNumber;

    //Exception occurs when set SheetNumber to a number that isn't unique
    string TestSheetNumber = "My sheet";
    viewSheet.SheetNumber = TestSheetNumber;
    message += "\nSheet Number after set: " + sheetNumber;

    ICollection<ElementId> views = viewSheet.GetAllPlacedViews();
    message += "\nNumber of views in the sheet : " + views.Count;

    TaskDialog.Show("Revit",message);
}
Copy VB.NET
Private Sub Getinfo_ViewSheet(viewSheet As ViewSheet)
    Dim message As String = "ViewSheet: "
    'Get the number of the Sheet
    Dim sheetNumber As String = viewSheet.SheetNumber
    message += vbLf & "Sheet Number: " & sheetNumber

    'Exception occurs when set SheetNumber to a number that isn't unique
    Dim TestSheetNumber As String = "My sheet"
    viewSheet.SheetNumber = TestSheetNumber
    message += vbLf & "Sheet Number after set: " & sheetNumber

    Dim views As ICollection(Of ElementId) = viewSheet.GetAllPlacedViews()
    message += vbLf & "Number of views in the sheet : " & views.Count

    TaskDialog.Show("Revit", message)
End Sub

Inheritance Hierarchy

See Also