/// <summary>
        /// A special case function that can export a Rebar element as an IfcBuildingElementProxy for view-specific exports where the exact geometry of the rebar matters.
        /// </summary>
        /// <param name="exporterIFC">The ExporterIFC object.</param>
        /// <param name="rebarElement">The rebar element to be exported.</param>
        /// <param name="productWrapper">The ProductWrapper object.</param>
        /// <param name="cannotExportRebar">True if we tried to create an IFC entity but failed.</param>
        /// <returns>True if the rebar was exported here, false otherwise.</returns>
        /// <remarks>This functionality may be obsoleted in the future.</remarks>
        private static IFCAnyHandle ExportRebarAsProxyElementInView(ExporterIFC exporterIFC, Element rebarElement, ProductWrapper productWrapper, out bool cannotExportRebar)
        {
            IFCAnyHandle rebarEntity = null;

            cannotExportRebar = false;

            if (rebarElement is Rebar && ExporterCacheManager.ExportOptionsCache.FilterViewForExport != null)
            {
                // The only options handled here is IfcBuildingElementProxy.
                // Not Exported is handled previously, and ReinforcingBar vs Mesh will be handled later.
                string            ifcEnumType;
                IFCExportInfoPair exportType = ExporterUtil.GetExportType(exporterIFC, rebarElement, out ifcEnumType);

                if (exportType.ExportInstance == IFCEntityType.IfcBuildingElementProxy ||
                    exportType.ExportType == IFCEntityType.IfcBuildingElementProxyType)
                {
                    Rebar           rebar         = rebarElement as Rebar;
                    GeometryElement rebarGeometry = rebar.GetFullGeometryForView(ExporterCacheManager.ExportOptionsCache.FilterViewForExport);
                    if (rebarGeometry != null)
                    {
                        rebarEntity = ProxyElementExporter.ExportBuildingElementProxy(exporterIFC, rebarElement, rebarGeometry, productWrapper);
                    }

                    cannotExportRebar = IFCAnyHandleUtil.IsNullOrHasNoValue(rebarEntity);
                }
            }

            return(rebarEntity);
        }