예제 #1
0
        internal void RenameSchedules(Subschedule template)
        {
            ViewSchedule vs = m_doc.GetElement(template.Id)
                              as ViewSchedule;

            vs.ViewName = template.ViewName;
        }
예제 #2
0
        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);
                }
            }
        }
예제 #3
0
        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]);
            }
        }
예제 #4
0
        internal void DuplicateSchedules(Subschedule template)
        {
            ViewSchedule vs = m_doc.GetElement(template.Id)
                              as ViewSchedule;

            template.Id =
                vs.Duplicate(ViewDuplicateOption.Duplicate);
        }
예제 #5
0
        internal void ShowTitle(Subschedule template)
        {
            ViewSchedule vs = m_doc.GetElement(template.Id)
                              as ViewSchedule;

            if (template.ShowTitle)
            {
                vs.Definition.ShowTitle = true;
            }
        }
예제 #6
0
 internal bool DiscardEmptySchedule(Subschedule template)
 {
     if (IsEmpty(template.Id))
     {
         m_doc.Delete(template.Id);
         template.Id = ElementId.InvalidElementId;
         return(true);
     }
     return(false);
 }
예제 #7
0
        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);
            }
        }