// This function is static to make sure that no properties are used directly from the entry.
        private static IFCAnyHandle CreatePropertyFromElementOrSymbolBase(IFCFile file, ExporterIFC exporterIFC, Element element,
                                                                          string revitParamNameToUse, string ifcPropertyName, BuiltInParameter builtInParameter,
                                                                          PropertyType propertyType, PropertyValueType valueType, Type propertyEnumerationType)
        {
            IFCAnyHandle propHnd = null;

            switch (propertyType)
            {
            case PropertyType.Text:
            {
                propHnd = PropertyUtil.CreateTextPropertyFromElementOrSymbol(file, element, revitParamNameToUse, builtInParameter, ifcPropertyName, valueType, propertyEnumerationType);
                break;
            }

            case PropertyType.Label:
            {
                propHnd = PropertyUtil.CreateLabelPropertyFromElementOrSymbol(file, element, revitParamNameToUse, builtInParameter, ifcPropertyName, valueType, propertyEnumerationType);
                break;
            }

            case PropertyType.Identifier:
            {
                propHnd = PropertyUtil.CreateIdentifierPropertyFromElementOrSymbol(file, element, revitParamNameToUse, builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Boolean:
            {
                propHnd = PropertyUtil.CreateBooleanPropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Logical:
            {
                propHnd = PropertyUtil.CreateLogicalPropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Integer:
            {
                propHnd = PropertyUtil.CreateIntegerPropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Real:
            {
                propHnd = PropertyUtil.CreateRealPropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Length:
            {
                propHnd = PropertyUtil.CreateLengthMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                      builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.PositiveLength:
            {
                propHnd = PropertyUtil.CreatePositiveLengthMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                              builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.NormalisedRatio:
            {
                propHnd = PropertyUtil.CreateNormalisedRatioPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                        ifcPropertyName, valueType);
                break;
            }

            case PropertyType.PositiveRatio:
            {
                propHnd = PropertyUtil.CreatePositiveRatioPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                      ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Ratio:
            {
                propHnd = PropertyUtil.CreateRatioPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, ifcPropertyName,
                                                                              valueType);
                break;
            }

            case PropertyType.PlaneAngle:
            {
                propHnd = PropertyUtil.CreatePlaneAngleMeasurePropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName,
                                                                                          valueType);
                break;
            }

            case PropertyType.PositivePlaneAngle:
            {
                propHnd = PositivePlaneAnglePropertyUtil.CreatePositivePlaneAngleMeasurePropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName,
                                                                                                                    valueType);
                break;
            }

            case PropertyType.Area:
            {
                propHnd = PropertyUtil.CreateAreaMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                    builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Volume:
            {
                propHnd = PropertyUtil.CreateVolumeMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                      builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Count:
            {
                propHnd = PropertyUtil.CreateCountMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                     builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Frequency:
            {
                propHnd = FrequencyPropertyUtil.CreateFrequencyPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                           ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ElectricCurrent:
            {
                propHnd = ElectricalCurrentPropertyUtil.CreateElectricalCurrentMeasurePropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ElectricVoltage:
            {
                propHnd = ElectricVoltagePropertyUtil.CreateElectricVoltageMeasurePropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.LuminousFlux:
            {
                propHnd = PropertyUtil.CreateLuminousFluxMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                            builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Force:
            {
                propHnd = FrequencyPropertyUtil.CreateForcePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                       ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Pressure:
            {
                propHnd = FrequencyPropertyUtil.CreatePressurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                          ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ColorTemperature:
            {
                propHnd = PropertyUtil.CreateColorTemperaturePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                         ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Currency:
            {
                propHnd = PropertyUtil.CreateCurrencyPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                 ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ElectricalEfficacy:
            {
                propHnd = PropertyUtil.CreateElectricalEfficacyPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                           ifcPropertyName, valueType);
                break;
            }

            case PropertyType.LuminousIntensity:
            {
                propHnd = PropertyUtil.CreateLuminousIntensityPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                          ifcPropertyName, valueType);
                break;
            }

            case PropertyType.MassDensity:
            {
                propHnd = PropertyUtil.CreateMassDensityPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                    ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Illuminance:
            {
                propHnd = PropertyUtil.CreateIlluminancePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                    ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Power:
            {
                propHnd = PropertyUtil.CreatePowerPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                              ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ThermodynamicTemperature:
            {
                propHnd = PropertyUtil.CreateThermodynamicTemperaturePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                                 builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ThermalTransmittance:
            {
                propHnd = PropertyUtil.CreateThermalTransmittancePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                             builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.VolumetricFlowRate:
            {
                propHnd = PropertyUtil.CreateVolumetricFlowRatePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                           builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ClassificationReference:
            {
                propHnd = PropertyUtil.CreateClassificationReferencePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                                builtInParameter, ifcPropertyName);
                break;
            }

            case PropertyType.LinearVelocity:
            {
                propHnd = PropertyUtil.CreateLinearVelocityPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                                                                                       ifcPropertyName, valueType);
                break;
            }

            default:
                throw new InvalidOperationException();
            }

            return(propHnd);
        }
        // This function is static to make sure that no properties are used directly from the entry.
        private static IFCAnyHandle CreatePropertyFromElementBase(IFCFile file, ExporterIFC exporterIFC, Element element,
                                                                  string revitParamNameToUse, string ifcPropertyName, BuiltInParameter builtInParameter,
                                                                  PropertyType propertyType, PropertyValueType valueType, Type propertyEnumerationType)
        {
            IFCAnyHandle propHnd = null;

            switch (propertyType)
            {
            case PropertyType.Area:
            {
                propHnd = PropertyUtil.CreateAreaMeasurePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                            builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.AreaDensity:
            {
                propHnd = PropertyUtil.CreateAreaDensityPropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                            builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Boolean:
            {
                propHnd = PropertyUtil.CreateBooleanPropertyFromElement(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ClassificationReference:
            {
                propHnd = PropertyUtil.CreateClassificationReferencePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                                        builtInParameter, ifcPropertyName);
                break;
            }

            case PropertyType.ColorTemperature:
            {
                propHnd = PropertyUtil.CreateColorTemperaturePropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                 ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Count:
            {
                propHnd = PropertyUtil.CreateCountMeasurePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                             builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Currency:
            {
                propHnd = PropertyUtil.CreateCurrencyPropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                         ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ElectricalEfficacy:
            {
                propHnd = PropertyUtil.CreateElectricalEfficacyPropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                   ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ElectricCurrent:
            {
                propHnd = ElectricalCurrentPropertyUtil.CreateElectricalCurrentMeasurePropertyFromElement(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ElectricVoltage:
            {
                propHnd = ElectricVoltagePropertyUtil.CreateElectricVoltageMeasurePropertyFromElement(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Force:
            {
                propHnd = FrequencyPropertyUtil.CreateForcePropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                               ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Frequency:
            {
                propHnd = FrequencyPropertyUtil.CreateFrequencyPropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                   ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Identifier:
            {
                propHnd = PropertyUtil.CreateIdentifierPropertyFromElement(file, element, revitParamNameToUse, builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Integer:
            {
                propHnd = PropertyUtil.CreateIntegerPropertyFromElement(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Illuminance:
            {
                propHnd = PropertyUtil.CreateIlluminancePropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                            ifcPropertyName, valueType);
                break;
            }

            case PropertyType.HeatFluxDensity:
            {
                propHnd = PropertyUtil.CreateHeatFluxDensityPropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Label:
            {
                propHnd = PropertyUtil.CreateLabelPropertyFromElement(file, element, revitParamNameToUse, builtInParameter, ifcPropertyName, valueType, propertyEnumerationType);
                break;
            }

            case PropertyType.Length:
            {
                propHnd = PropertyUtil.CreateLengthMeasurePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                              builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.LinearVelocity:
            {
                propHnd = PropertyUtil.CreateLinearVelocityPropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                               ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Logical:
            {
                propHnd = PropertyUtil.CreateLogicalPropertyFromElement(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.LuminousFlux:
            {
                propHnd = PropertyUtil.CreateLuminousFluxMeasurePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                                    builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.LuminousIntensity:
            {
                propHnd = PropertyUtil.CreateLuminousIntensityPropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                  ifcPropertyName, valueType);
                break;
            }

            case PropertyType.LinearForce:
            {
                propHnd = PropertyUtil.CreateLinearForcePropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                            ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Mass:
            {
                propHnd = PropertyUtil.CreateMassPropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                     ifcPropertyName, valueType);
                break;
            }

            case PropertyType.MassDensity:
            {
                propHnd = PropertyUtil.CreateMassDensityPropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                            ifcPropertyName, valueType);
                break;
            }

            case PropertyType.NormalisedRatio:
            {
                propHnd = PropertyUtil.CreateNormalisedRatioPropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                                ifcPropertyName, valueType);
                break;
            }

            case PropertyType.PlaneAngle:
            {
                propHnd = PropertyUtil.CreatePlaneAngleMeasurePropertyFromElement(file, element, revitParamNameToUse, ifcPropertyName,
                                                                                  valueType);
                break;
            }

            case PropertyType.PlanarForce:
            {
                propHnd = PropertyUtil.CreatePlanarForcePropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                            ifcPropertyName, valueType);
                break;
            }

            case PropertyType.PositiveLength:
            {
                propHnd = PropertyUtil.CreatePositiveLengthMeasurePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                                      builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.PositiveRatio:
            {
                propHnd = PropertyUtil.CreatePositiveRatioPropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                              ifcPropertyName, valueType);
                break;
            }

            case PropertyType.PositivePlaneAngle:
            {
                propHnd = PositivePlaneAnglePropertyUtil.CreatePositivePlaneAngleMeasurePropertyFromElement(file, element, revitParamNameToUse, ifcPropertyName,
                                                                                                            valueType);
                break;
            }

            case PropertyType.Power:
            {
                propHnd = PropertyUtil.CreatePowerPropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                      ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Pressure:
            {
                propHnd = FrequencyPropertyUtil.CreatePressurePropertyFromElement(file, exporterIFC, element, revitParamNameToUse, builtInParameter,
                                                                                  ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Ratio:
            {
                propHnd = PropertyUtil.CreateRatioPropertyFromElement(file, exporterIFC, element, revitParamNameToUse, ifcPropertyName,
                                                                      valueType);
                break;
            }

            case PropertyType.Real:
            {
                propHnd = PropertyUtil.CreateRealPropertyFromElement(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Text:
            {
                propHnd = PropertyUtil.CreateTextPropertyFromElement(file, element, revitParamNameToUse, builtInParameter, ifcPropertyName, valueType, propertyEnumerationType);
                break;
            }

            case PropertyType.ThermalTransmittance:
            {
                propHnd = PropertyUtil.CreateThermalTransmittancePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                                     builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ThermodynamicTemperature:
            {
                propHnd = PropertyUtil.CreateThermodynamicTemperaturePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                                         builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.Volume:
            {
                propHnd = PropertyUtil.CreateVolumeMeasurePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                              builtInParameter, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.VolumetricFlowRate:
            {
                propHnd = PropertyUtil.CreateVolumetricFlowRatePropertyFromElement(file, exporterIFC, element, revitParamNameToUse,
                                                                                   builtInParameter, ifcPropertyName, valueType);
                break;
            }

            // Known unhandled cases:
            case PropertyType.IfcCalendarDate:
            case PropertyType.IfcClassificationReference:
            case PropertyType.IfcExternalReference:
            case PropertyType.IfcMaterial:
            case PropertyType.IfcOrganization:
            case PropertyType.Monetary:
            case PropertyType.Time:
                return(null);

            default:
                // Unexpected unhandled cases.
                return(null);
            }

            return(propHnd);
        }