public static void CalculatePressurizationForSpaces(IEnumerable <Space> spaces)
 {
     foreach (var space in spaces)
     {
         VentilationParameterUtility.AssignRequiredPressurization(space);
         VentilationParameterUtility.AssignModeledPressurization(space);
     }
 }
 public static void CalculateCurrentCFMForSpaces(IEnumerable <Space> spaces)
 {
     foreach (var space in spaces)
     {
         VentilationParameterUtility.AssignACHMBasedOnCategory(space);
         VentilationParameterUtility.AssignOAACHMBasedOnCategory(space);
     }
 }
 /// <summary>
 /// Gets values of Ventilation Requirement parameters from a lookup tables based on Space values
 /// </summary>
 /// <param name="spaces"></param>
 public static void ApplyVentRequirementsToSpaces(IEnumerable <Space> spaces)
 {
     foreach (var space in spaces)
     {
         VentilationParameterUtility.AssignACHRBasedOnCategory(space);
         VentilationParameterUtility.AssignOAACHRBasedOnCategory(space);
     }
 }
        /// <summary>
        /// Gets the vent parameters necessary or creates them if they are unavailable
        /// </summary>
        /// <param name="schedule"></param>
        public static void AddVentParametersToSchedule(ViewSchedule schedule)
        {
            // check if doc has vent parameters
            // if not create them
            var hasVentParams = VentilationParameterUtility.ModelHasVentParameters(schedule.Document);

            var ventParams = hasVentParams
                ? VentilationParameterUtility.GetVentParametersFromModel(schedule.Document)
                : VentilationParameterUtility.CreateVentParametersInModel(schedule.Document);

            // add them to the schedule as schedulable fields
            VentilationParameterUtility.AddParameterToSchedule(schedule, ventParams.ToArray());
        }
Exemplo n.º 5
0
        public static IList <Parameter> GetVentParameters(Document doc)
        {
            if (VentilationParameterUtility.ModelHasVentParameters(doc))
            {
                return(VentilationParameterUtility.GetVentParametersFromModel(doc));
            }

            var defs = GetVentParameterDefinitions(doc);
            var pars = new List <Parameter>();

            foreach (var d in defs)
            {
                var p = doc.GetParameterFromCategory(BuiltInCategory.OST_MEPSpaces, d.Name);
                pars.Add(p);
            }

            return(pars);
        }
        /// <summary>
        /// Gets vent parameter definitions or creates them if they don't exist
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        public static IList <Definition> GetVentParameterDefinitions(Document doc)
        {
            var file = doc.Application.OpenSharedParameterFile() ??
                       VentilationParameterUtility.SetVentParameterFileAsCurrent(doc);

            var list   = new List <Definition>();
            var achr   = CreateOrGetACHRParameter(file);
            var achm   = CreateOrGetACHMParameter(file);
            var oaachr = CreateOrGetOAACHRParameter(file);
            var oaachm = CreateOrGetOAACHMParameter(file);
            var pReq   = CreateOrGetPressureRequiredParameter(file);
            var pMod   = CreateOrGetPressureModelParameter(file);

            var vents = new Definition[]
            {
                achr, achm, oaachr, oaachm, pReq, pMod
            };

            list.AddRange(vents);

            return(list);
        }