// 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.ElectricalCurrent:
            {
                propHnd = ElectricalCurrentPropertyUtil.CreateElectricalCurrentMeasurePropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                break;
            }

            case PropertyType.ElectricalVoltage:
            {
                propHnd = ElectricalVoltagePropertyUtil.CreateElectricalVoltageMeasurePropertyFromElementOrSymbol(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);
        }