IViewSheetSet Interface


IView Sheet Set 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: 25.0.0.0 (25.0.0.0)
Syntax
public interface IViewSheetSet

The IViewSheetSet type exposes the following members.

Properties
Name Description
Public property IsAutomatic Automatic order or manual order.
Public property OrderedViewList Ordered views.
Public property SheetOrganizationId ElementId to the BrowserOrganization for sheets.
Public property ViewOrganizationId ElementId to the BrowserOrganization for non-sheet views.
Public property Views The views.
Top
Example
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;
}
See Also