IViewSheetSet Interface


This interface represents a selected set of views/sheets which will be used for printing.

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

Syntax

C#
public interface IViewSheetSet
Visual Basic
Public Interface IViewSheetSet
Visual C++
public interface class IViewSheetSet

Examples

Copy C#
private void SwitchToAutomaticOrder(Document doc, ViewSheetSetting viewSheetSetting)
{
   IViewSheetSet viewSheetSet = viewSheetSetting.CurrentViewSheetSet;
   var sheetBrowserOrg = BrowserOrganization.GetCurrentBrowserOrganizationForSheets(doc);
   var viewBrowserOrg = BrowserOrganization.GetCurrentBrowserOrganizationForViews(doc);
   viewSheetSet.SheetOrganizationId = sheetBrowserOrg.Id;
   viewSheetSet.ViewOrganizationId = viewBrowserOrg.Id;
   viewSheetSet.IsAutomatic = true; // IsAutomatic must be true then views and sheets will be ordered by Browser Organization
}

private void SwitchToCustomOrder(Document doc, ViewSheetSetting viewSheetSetting, IReadOnlyList<View> customViews)
{
   IViewSheetSet viewSheetSet = viewSheetSetting.CurrentViewSheetSet;
   // IsAutomatic must be false, then OrderedViewList will be organized in custom order
   // Note that the moment you set IsAutomatic from true to false, the order in OrderedViewList will be organized by Browser Organization
   viewSheetSet.IsAutomatic = false; // IMPORTANT: IsAutomatic before assigning OrderedViewList
   viewSheetSet.OrderedViewList = customViews;
}
Copy VB.NET
Private Sub SwitchToAutomaticOrder(ByVal doc As Document, ByVal viewSheetSetting As ViewSheetSetting)
    Dim viewSheetSet = viewSheetSetting.CurrentViewSheetSet
    Dim sheetBrowserOrg = BrowserOrganization.GetCurrentBrowserOrganizationForSheets(doc)
    Dim viewBrowserOrg = BrowserOrganization.GetCurrentBrowserOrganizationForViews(doc)
    viewSheetSet.SheetOrganizationId = sheetBrowserOrg.Id
    viewSheetSet.ViewOrganizationId = viewBrowserOrg.Id
    viewSheetSet.IsAutomatic = True ' IsAutomatic must be true then views and sheets will be ordered by Browser Organization
End Sub

Private Sub SwitchToCustomOrder(ByVal doc As Document, ByVal viewSheetSetting As ViewSheetSetting, ByVal customViews As IReadOnlyList(Of View))
    Dim viewSheetSet = viewSheetSetting.CurrentViewSheetSet
    ' IsAutomatic must be false, then OrderedViewList will be organized in custom order
    ' Note that the moment you set IsAutomatic from true to false, the order in OrderedViewList will be organized by Browser Organization
    viewSheetSet.IsAutomatic = False ' IMPORTANT: IsAutomatic before assigning OrderedViewList
    viewSheetSet.OrderedViewList = customViews
End Sub

See Also