Esempio n. 1
0
        /// <summary>
        /// Creates or populates Revit elements based on the information contained in this class.
        /// </summary>
        /// <param name="doc">The document.</param>
        protected override void Create(Document doc)
        {
            if (MaterialSelect != null)
            {
                MaterialSelect.Create(doc);
            }

            base.Create(doc);

            TraverseSubElements(doc);
        }
Esempio n. 2
0
        /// <summary>
        /// The list of materials directly associated with the element.  There may be more at the type level.
        /// </summary>
        /// <returns>A list, possibly empty, of materials directly associated with the element.</returns>
        public IList <IFCMaterial> GetMaterials()
        {
            IList <IFCMaterial> materials = null;

            if (MaterialSelect != null)
            {
                materials = MaterialSelect.GetMaterials();
            }

            if (materials == null)
            {
                return(new List <IFCMaterial>());
            }

            return(materials);
        }