コード例 #1
0
        /// <summary>
        /// Caches all parameter value overrides of the subelement.
        /// </summary>
        /// <param name="element">The rebar element.</param>
        /// <param name="parameters">The paramters of the rebar element.</param>
        /// <param name="barIndex">The index of the subelement.</param>
        /// <param name="handleSubelement">The handle of the subelement.</param>
        static void CacheSubelementParameterValues(Element element, ParameterSet parameters, int barIndex, IFCAnyHandle handleSubelement)
        {
            if (element == null)
            {
                return;
            }

            if (element is Rebar)
            {
                Rebar rebar = element as Rebar;
                if (rebar.DistributionType != DistributionType.VaryingLength)
                {
                    return;
                }

                foreach (Parameter param in parameters)
                {
                    ParameterUtil.CacheParameterValuesForSubelementHandle(element.Id, handleSubelement, param, rebar.GetParameterValueAtIndex(param.Id, barIndex));
                }
            }
        }