/// <summary> /// Calculates covering finish value. /// </summary> /// <remarks> /// True for structural columns, and false for architectural ones. /// </remarks> /// <param name="exporterIFC"> /// The ExporterIFC object. /// </param> /// <param name="extrusionCreationData"> /// The IFCExtrusionCreationData. /// </param> /// <param name="element"> /// The element to calculate the value. /// </param> /// <param name="elementType"> /// The element type. /// </param> /// <returns> /// True if the operation succeed, false otherwise. /// </returns> public override bool Calculate(ExporterIFC exporterIFC, IFCExtrusionCreationData extrusionCreationData, Element element, ElementType elementType) { ParameterUtil.GetStringValueFromElementOrSymbol(element, "Finish", out m_Finish); if (!string.IsNullOrEmpty(m_Finish)) { return(true); } if (element is Ceiling) { m_Finish = string.Empty; ISet <ElementId> matIds = HostObjectExporter.GetFinishMaterialIds(element as HostObject); foreach (ElementId matId in matIds) { string materialName = NamingUtil.GetMaterialName(element.Document, matId); if (string.IsNullOrWhiteSpace(materialName)) { continue; } m_Finish += materialName + ";"; } return(!string.IsNullOrEmpty(m_Finish)); } return(false); }
/// <summary> /// Calculates covering finish value. /// </summary> /// <remarks> /// True for structural columns, and false for architectural ones. /// </remarks> /// <param name="exporterIFC"> /// The ExporterIFC object. /// </param> /// <param name="extrusionCreationData"> /// The IFCExtrusionCreationData. /// </param> /// <param name="element"> /// The element to calculate the value. /// </param> /// <param name="elementType"> /// The element type. /// </param> /// <returns> /// True if the operation succeed, false otherwise. /// </returns> public override bool Calculate(ExporterIFC exporterIFC, IFCExtrusionCreationData extrusionCreationData, Element element, ElementType elementType) { if (element is Ceiling) { m_Finish = string.Empty; ISet <ElementId> matIds = HostObjectExporter.GetFinishMaterialIds(element as HostObject); foreach (ElementId matId in matIds) { m_Finish += element.Document.GetElement(matId).Name + ";"; } return(!string.IsNullOrEmpty(m_Finish)); } return(false); }