/***************************************************/ /**** Public Methods ****/ /***************************************************/ public static ViewSheet ToRevitSheet(this Sheet sheet, Document document, RevitSettings settings = null, Dictionary <Guid, List <int> > refObjects = null) { if (sheet == null) { return(null); } ViewSheet viewSheet = refObjects.GetValue <ViewSheet>(document, sheet.BHoM_Guid); if (viewSheet != null) { return(viewSheet); } settings = settings.DefaultIfNull(); viewSheet = ViewSheet.Create(document, ElementId.InvalidElementId); viewSheet.Name = sheet.SheetName; viewSheet.SheetNumber = sheet.SheetNumber; // Copy parameters from BHoM object to Revit element viewSheet.CopyParameters(sheet, settings); refObjects.AddOrReplace(sheet, viewSheet); return(viewSheet); }