/// <summary> /// Exports curtain wall types to IfcCurtainWallType. /// </summary> /// <param name="exporterIFC">The exporter.</param> /// <param name="wrapper">The ProductWrapper class.</param> /// <param name="elementHandle">The element handle.</param> /// <param name="element">The element.</param> public static void ExportCurtainWallType(ExporterIFC exporterIFC, ProductWrapper wrapper, IFCAnyHandle elementHandle, Element element) { if (elementHandle == null || element == null) { return; } Document doc = element.Document; ElementId typeElemId = element.GetTypeId(); ElementType elementType = doc.GetElement(typeElemId) as ElementType; if (elementType == null) { return; } IFCExportInfoPair exportType = new IFCExportInfoPair(IFCEntityType.IfcCurtainWallType); IFCAnyHandle wallType = ExporterCacheManager.ElementTypeToHandleCache.Find(elementType, exportType); if (!IFCAnyHandleUtil.IsNullOrHasNoValue(wallType)) { ExporterCacheManager.TypeRelationsCache.Add(wallType, elementHandle); return; } string elemElementType = NamingUtil.GetElementTypeOverride(elementType, null); // Property sets will be set later. wallType = IFCInstanceExporter.CreateCurtainWallType(exporterIFC.GetFile(), elementType, null, null, null, elemElementType, (elemElementType != null) ? "USERDEFINED" : "NOTDEFINED"); wrapper.RegisterHandleWithElementType(elementType, exportType, wallType, null); ExporterCacheManager.TypeRelationsCache.Add(wallType, elementHandle); }