internal void RenameSchedules(Subschedule template) { ViewSchedule vs = m_doc.GetElement(template.Id) as ViewSchedule; vs.ViewName = template.ViewName; }
internal void SetSubschedules(IMultitableSchedule multiSchd) { for (int i = 0; i < multiSchd.ViewNameEndings.Count; ++i) { ElementId tmplId = FindTemplateByViewNameEnding(multiSchd.ViewNameEndings[i]); if (tmplId != null) { Subschedule subSchedule = new Subschedule { Id = tmplId, IsTemplate = true, ViewName = GenerateViewName(multiSchd, i), ShowTitle = false }; if (i == 0 && multiSchd.FiltersValues[ MultischeduleParameters.SHOW_TITLE].Equals("1")) { subSchedule.ShowTitle = true; } multiSchd.Subschedules.Add(subSchedule); } } }
internal void SetBlockAndPartition(Subschedule template, IMultitableSchedule multiSchedule) { if (template.Id == ElementId.InvalidElementId) { return; } Element subSchd = m_doc.GetElement(template.Id); //Parameter blockNo = subSchd.LookupParameter(RebarsUtils.BLOCK_NUMBER); Parameter blockNo = subSchd.LookupParameter( MultischeduleParameters.BLOCK_NUMBER); //Parameter partition = subSchd.LookupParameter(RebarsUtils.PARTITION); Parameter partition = subSchd.LookupParameter( MultischeduleParameters.PARTITION); if (blockNo != null) { blockNo.Set(multiSchedule .FiltersValues[MultischeduleParameters.BLOCK_NUMBER]); } if (partition != null) { partition.Set(multiSchedule .FiltersValues[MultischeduleParameters.PARTITION]); } }
internal void DuplicateSchedules(Subschedule template) { ViewSchedule vs = m_doc.GetElement(template.Id) as ViewSchedule; template.Id = vs.Duplicate(ViewDuplicateOption.Duplicate); }
internal void ShowTitle(Subschedule template) { ViewSchedule vs = m_doc.GetElement(template.Id) as ViewSchedule; if (template.ShowTitle) { vs.Definition.ShowTitle = true; } }
internal bool DiscardEmptySchedule(Subschedule template) { if (IsEmpty(template.Id)) { m_doc.Delete(template.Id); template.Id = ElementId.InvalidElementId; return(true); } return(false); }
internal void UpdateFilters(Subschedule template, IMultitableSchedule multiSchedule) { ViewSchedule vs = m_doc.GetElement(template.Id) as ViewSchedule; for (int j = 0; j < multiSchedule.FiltersValues.Count; ++j) { string fltrName = multiSchedule.FiltersValues.Keys.ElementAt(j); dynamic value = multiSchedule.FiltersValues[fltrName]; UpdateFilter(fltrName, value, vs.Definition); } }