// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool Xbim.CodeGeneration 
//  
//     Changes to this file may cause incorrect behaviour and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

using Xbim.Ifc4.Interfaces;
using System.Collections.Generic;
using System.Linq;
using Xbim.Common;

// ReSharper disable once CheckNamespace
namespace Xbim.Ifc2x3.PropertyResource
{
	public partial class @IfcPropertySingleValue : IIfcPropertySingleValue
	{

		private  IIfcValue _nominalValue4;


		[CrossSchemaAttribute(typeof(IIfcPropertySingleValue), 3)]
		IIfcValue IIfcPropertySingleValue.NominalValue 
		{ 
			get
			{
				if (_nominalValue4 != null) return _nominalValue4;
				if (NominalValue == null) return null;
				if (NominalValue is MeasureResource.IfcVolumeMeasure) 
					return new Ifc4.MeasureResource.IfcVolumeMeasure((MeasureResource.IfcVolumeMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcTimeMeasure) 
					return new Ifc4.MeasureResource.IfcTimeMeasure((MeasureResource.IfcTimeMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcThermodynamicTemperatureMeasure) 
					return new Ifc4.MeasureResource.IfcThermodynamicTemperatureMeasure((MeasureResource.IfcThermodynamicTemperatureMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcSolidAngleMeasure) 
					return new Ifc4.MeasureResource.IfcSolidAngleMeasure((MeasureResource.IfcSolidAngleMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcPositiveRatioMeasure) 
					return new Ifc4.MeasureResource.IfcPositiveRatioMeasure((MeasureResource.IfcPositiveRatioMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcRatioMeasure) 
					return new Ifc4.MeasureResource.IfcRatioMeasure((MeasureResource.IfcRatioMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcPositivePlaneAngleMeasure) 
					return new Ifc4.MeasureResource.IfcPositivePlaneAngleMeasure((MeasureResource.IfcPositivePlaneAngleMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcPlaneAngleMeasure) 
					return new Ifc4.MeasureResource.IfcPlaneAngleMeasure((MeasureResource.IfcPlaneAngleMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcParameterValue) 
					return new Ifc4.MeasureResource.IfcParameterValue((MeasureResource.IfcParameterValue)NominalValue);
				if (NominalValue is MeasureResource.IfcNumericMeasure) 
					return new Ifc4.MeasureResource.IfcNumericMeasure((MeasureResource.IfcNumericMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMassMeasure) 
					return new Ifc4.MeasureResource.IfcMassMeasure((MeasureResource.IfcMassMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcPositiveLengthMeasure) 
					return new Ifc4.MeasureResource.IfcPositiveLengthMeasure((MeasureResource.IfcPositiveLengthMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcLengthMeasure) 
					return new Ifc4.MeasureResource.IfcLengthMeasure((MeasureResource.IfcLengthMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcElectricCurrentMeasure) 
					return new Ifc4.MeasureResource.IfcElectricCurrentMeasure((MeasureResource.IfcElectricCurrentMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcDescriptiveMeasure) 
					return new Ifc4.MeasureResource.IfcDescriptiveMeasure((MeasureResource.IfcDescriptiveMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcCountMeasure) 
					return new Ifc4.MeasureResource.IfcCountMeasure((MeasureResource.IfcCountMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcContextDependentMeasure) 
					return new Ifc4.MeasureResource.IfcContextDependentMeasure((MeasureResource.IfcContextDependentMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcAreaMeasure) 
					return new Ifc4.MeasureResource.IfcAreaMeasure((MeasureResource.IfcAreaMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcAmountOfSubstanceMeasure) 
					return new Ifc4.MeasureResource.IfcAmountOfSubstanceMeasure((MeasureResource.IfcAmountOfSubstanceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcLuminousIntensityMeasure) 
					return new Ifc4.MeasureResource.IfcLuminousIntensityMeasure((MeasureResource.IfcLuminousIntensityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcNormalisedRatioMeasure) 
					return new Ifc4.MeasureResource.IfcNormalisedRatioMeasure((MeasureResource.IfcNormalisedRatioMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcComplexNumber) 
					return new Ifc4.MeasureResource.IfcComplexNumber((MeasureResource.IfcComplexNumber)NominalValue);
				if (NominalValue is MeasureResource.IfcInteger) 
					return new Ifc4.MeasureResource.IfcInteger((MeasureResource.IfcInteger)NominalValue);
				if (NominalValue is MeasureResource.IfcReal) 
					return new Ifc4.MeasureResource.IfcReal((MeasureResource.IfcReal)NominalValue);
				if (NominalValue is MeasureResource.IfcBoolean) 
					return new Ifc4.MeasureResource.IfcBoolean((MeasureResource.IfcBoolean)NominalValue);
				if (NominalValue is MeasureResource.IfcIdentifier) 
					return new Ifc4.MeasureResource.IfcIdentifier((MeasureResource.IfcIdentifier)NominalValue);
				if (NominalValue is MeasureResource.IfcText) 
					return new Ifc4.MeasureResource.IfcText((MeasureResource.IfcText)NominalValue);
				if (NominalValue is MeasureResource.IfcLabel) 
					return new Ifc4.MeasureResource.IfcLabel((MeasureResource.IfcLabel)NominalValue);
				if (NominalValue is MeasureResource.IfcLogical) 
					return new Ifc4.MeasureResource.IfcLogical((MeasureResource.IfcLogical)NominalValue);
				if (NominalValue is MeasureResource.IfcVolumetricFlowRateMeasure) 
					return new Ifc4.MeasureResource.IfcVolumetricFlowRateMeasure((MeasureResource.IfcVolumetricFlowRateMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcTimeStamp) 
					return new Ifc4.DateTimeResource.IfcTimeStamp((MeasureResource.IfcTimeStamp)NominalValue);
				if (NominalValue is MeasureResource.IfcThermalTransmittanceMeasure) 
					return new Ifc4.MeasureResource.IfcThermalTransmittanceMeasure((MeasureResource.IfcThermalTransmittanceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcThermalResistanceMeasure) 
					return new Ifc4.MeasureResource.IfcThermalResistanceMeasure((MeasureResource.IfcThermalResistanceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcThermalAdmittanceMeasure) 
					return new Ifc4.MeasureResource.IfcThermalAdmittanceMeasure((MeasureResource.IfcThermalAdmittanceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcPressureMeasure) 
					return new Ifc4.MeasureResource.IfcPressureMeasure((MeasureResource.IfcPressureMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcPowerMeasure) 
					return new Ifc4.MeasureResource.IfcPowerMeasure((MeasureResource.IfcPowerMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMassFlowRateMeasure) 
					return new Ifc4.MeasureResource.IfcMassFlowRateMeasure((MeasureResource.IfcMassFlowRateMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMassDensityMeasure) 
					return new Ifc4.MeasureResource.IfcMassDensityMeasure((MeasureResource.IfcMassDensityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcLinearVelocityMeasure) 
					return new Ifc4.MeasureResource.IfcLinearVelocityMeasure((MeasureResource.IfcLinearVelocityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcKinematicViscosityMeasure) 
					return new Ifc4.MeasureResource.IfcKinematicViscosityMeasure((MeasureResource.IfcKinematicViscosityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcIntegerCountRateMeasure) 
					return new Ifc4.MeasureResource.IfcIntegerCountRateMeasure((MeasureResource.IfcIntegerCountRateMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcHeatFluxDensityMeasure) 
					return new Ifc4.MeasureResource.IfcHeatFluxDensityMeasure((MeasureResource.IfcHeatFluxDensityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcFrequencyMeasure) 
					return new Ifc4.MeasureResource.IfcFrequencyMeasure((MeasureResource.IfcFrequencyMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcEnergyMeasure) 
					return new Ifc4.MeasureResource.IfcEnergyMeasure((MeasureResource.IfcEnergyMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcElectricVoltageMeasure) 
					return new Ifc4.MeasureResource.IfcElectricVoltageMeasure((MeasureResource.IfcElectricVoltageMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcDynamicViscosityMeasure) 
					return new Ifc4.MeasureResource.IfcDynamicViscosityMeasure((MeasureResource.IfcDynamicViscosityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcCompoundPlaneAngleMeasure) 
					return new Ifc4.MeasureResource.IfcCompoundPlaneAngleMeasure((MeasureResource.IfcCompoundPlaneAngleMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcAngularVelocityMeasure) 
					return new Ifc4.MeasureResource.IfcAngularVelocityMeasure((MeasureResource.IfcAngularVelocityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcThermalConductivityMeasure) 
					return new Ifc4.MeasureResource.IfcThermalConductivityMeasure((MeasureResource.IfcThermalConductivityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMolecularWeightMeasure) 
					return new Ifc4.MeasureResource.IfcMolecularWeightMeasure((MeasureResource.IfcMolecularWeightMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcVaporPermeabilityMeasure) 
					return new Ifc4.MeasureResource.IfcVaporPermeabilityMeasure((MeasureResource.IfcVaporPermeabilityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMoistureDiffusivityMeasure) 
					return new Ifc4.MeasureResource.IfcMoistureDiffusivityMeasure((MeasureResource.IfcMoistureDiffusivityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcIsothermalMoistureCapacityMeasure) 
					return new Ifc4.MeasureResource.IfcIsothermalMoistureCapacityMeasure((MeasureResource.IfcIsothermalMoistureCapacityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcSpecificHeatCapacityMeasure) 
					return new Ifc4.MeasureResource.IfcSpecificHeatCapacityMeasure((MeasureResource.IfcSpecificHeatCapacityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMonetaryMeasure) 
					return new Ifc4.MeasureResource.IfcMonetaryMeasure((MeasureResource.IfcMonetaryMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMagneticFluxDensityMeasure) 
					return new Ifc4.MeasureResource.IfcMagneticFluxDensityMeasure((MeasureResource.IfcMagneticFluxDensityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMagneticFluxMeasure) 
					return new Ifc4.MeasureResource.IfcMagneticFluxMeasure((MeasureResource.IfcMagneticFluxMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcLuminousFluxMeasure) 
					return new Ifc4.MeasureResource.IfcLuminousFluxMeasure((MeasureResource.IfcLuminousFluxMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcForceMeasure) 
					return new Ifc4.MeasureResource.IfcForceMeasure((MeasureResource.IfcForceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcInductanceMeasure) 
					return new Ifc4.MeasureResource.IfcInductanceMeasure((MeasureResource.IfcInductanceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcIlluminanceMeasure) 
					return new Ifc4.MeasureResource.IfcIlluminanceMeasure((MeasureResource.IfcIlluminanceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcElectricResistanceMeasure) 
					return new Ifc4.MeasureResource.IfcElectricResistanceMeasure((MeasureResource.IfcElectricResistanceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcElectricConductanceMeasure) 
					return new Ifc4.MeasureResource.IfcElectricConductanceMeasure((MeasureResource.IfcElectricConductanceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcElectricChargeMeasure) 
					return new Ifc4.MeasureResource.IfcElectricChargeMeasure((MeasureResource.IfcElectricChargeMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcDoseEquivalentMeasure) 
					return new Ifc4.MeasureResource.IfcDoseEquivalentMeasure((MeasureResource.IfcDoseEquivalentMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcElectricCapacitanceMeasure) 
					return new Ifc4.MeasureResource.IfcElectricCapacitanceMeasure((MeasureResource.IfcElectricCapacitanceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcAbsorbedDoseMeasure) 
					return new Ifc4.MeasureResource.IfcAbsorbedDoseMeasure((MeasureResource.IfcAbsorbedDoseMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcRadioActivityMeasure) 
					return new Ifc4.MeasureResource.IfcRadioActivityMeasure((MeasureResource.IfcRadioActivityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcRotationalFrequencyMeasure) 
					return new Ifc4.MeasureResource.IfcRotationalFrequencyMeasure((MeasureResource.IfcRotationalFrequencyMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcTorqueMeasure) 
					return new Ifc4.MeasureResource.IfcTorqueMeasure((MeasureResource.IfcTorqueMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcAccelerationMeasure) 
					return new Ifc4.MeasureResource.IfcAccelerationMeasure((MeasureResource.IfcAccelerationMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcLinearForceMeasure) 
					return new Ifc4.MeasureResource.IfcLinearForceMeasure((MeasureResource.IfcLinearForceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcLinearStiffnessMeasure) 
					return new Ifc4.MeasureResource.IfcLinearStiffnessMeasure((MeasureResource.IfcLinearStiffnessMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcModulusOfSubgradeReactionMeasure) 
					return new Ifc4.MeasureResource.IfcModulusOfSubgradeReactionMeasure((MeasureResource.IfcModulusOfSubgradeReactionMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcModulusOfElasticityMeasure) 
					return new Ifc4.MeasureResource.IfcModulusOfElasticityMeasure((MeasureResource.IfcModulusOfElasticityMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMomentOfInertiaMeasure) 
					return new Ifc4.MeasureResource.IfcMomentOfInertiaMeasure((MeasureResource.IfcMomentOfInertiaMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcPlanarForceMeasure) 
					return new Ifc4.MeasureResource.IfcPlanarForceMeasure((MeasureResource.IfcPlanarForceMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcRotationalStiffnessMeasure) 
					return new Ifc4.MeasureResource.IfcRotationalStiffnessMeasure((MeasureResource.IfcRotationalStiffnessMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcShearModulusMeasure) 
					return new Ifc4.MeasureResource.IfcShearModulusMeasure((MeasureResource.IfcShearModulusMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcLinearMomentMeasure) 
					return new Ifc4.MeasureResource.IfcLinearMomentMeasure((MeasureResource.IfcLinearMomentMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcLuminousIntensityDistributionMeasure) 
					return new Ifc4.MeasureResource.IfcLuminousIntensityDistributionMeasure((MeasureResource.IfcLuminousIntensityDistributionMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcCurvatureMeasure) 
					return new Ifc4.MeasureResource.IfcCurvatureMeasure((MeasureResource.IfcCurvatureMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcMassPerLengthMeasure) 
					return new Ifc4.MeasureResource.IfcMassPerLengthMeasure((MeasureResource.IfcMassPerLengthMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure) 
					return new Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure((MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure) 
					return new Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure((MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcRotationalMassMeasure) 
					return new Ifc4.MeasureResource.IfcRotationalMassMeasure((MeasureResource.IfcRotationalMassMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcSectionalAreaIntegralMeasure) 
					return new Ifc4.MeasureResource.IfcSectionalAreaIntegralMeasure((MeasureResource.IfcSectionalAreaIntegralMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcSectionModulusMeasure) 
					return new Ifc4.MeasureResource.IfcSectionModulusMeasure((MeasureResource.IfcSectionModulusMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcTemperatureGradientMeasure) 
					return new Ifc4.MeasureResource.IfcTemperatureGradientMeasure((MeasureResource.IfcTemperatureGradientMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcThermalExpansionCoefficientMeasure) 
					return new Ifc4.MeasureResource.IfcThermalExpansionCoefficientMeasure((MeasureResource.IfcThermalExpansionCoefficientMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcWarpingConstantMeasure) 
					return new Ifc4.MeasureResource.IfcWarpingConstantMeasure((MeasureResource.IfcWarpingConstantMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcWarpingMomentMeasure) 
					return new Ifc4.MeasureResource.IfcWarpingMomentMeasure((MeasureResource.IfcWarpingMomentMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcSoundPowerMeasure) 
					return new Ifc4.MeasureResource.IfcSoundPowerMeasure((MeasureResource.IfcSoundPowerMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcSoundPressureMeasure) 
					return new Ifc4.MeasureResource.IfcSoundPressureMeasure((MeasureResource.IfcSoundPressureMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcHeatingValueMeasure) 
					return new Ifc4.MeasureResource.IfcHeatingValueMeasure((MeasureResource.IfcHeatingValueMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcPHMeasure) 
					return new Ifc4.MeasureResource.IfcPHMeasure((MeasureResource.IfcPHMeasure)NominalValue);
				if (NominalValue is MeasureResource.IfcIonConcentrationMeasure) 
					return new Ifc4.MeasureResource.IfcIonConcentrationMeasure((MeasureResource.IfcIonConcentrationMeasure)NominalValue);
				return null;
			} 
			set
			{
				if (value == null)
				{
					NominalValue = null;
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}	
				if (value is Ifc4.MeasureResource.IfcAbsorbedDoseMeasure) 
				{
					NominalValue = new MeasureResource.IfcAbsorbedDoseMeasure((Ifc4.MeasureResource.IfcAbsorbedDoseMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcAccelerationMeasure) 
				{
					NominalValue = new MeasureResource.IfcAccelerationMeasure((Ifc4.MeasureResource.IfcAccelerationMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcAngularVelocityMeasure) 
				{
					NominalValue = new MeasureResource.IfcAngularVelocityMeasure((Ifc4.MeasureResource.IfcAngularVelocityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcAreaDensityMeasure) 
				{
					if (NominalValue != null)
						NominalValue = null;
					SetValue(v => _nominalValue4 = v, _nominalValue4, value, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcCompoundPlaneAngleMeasure) 
				{
					NominalValue = new MeasureResource.IfcCompoundPlaneAngleMeasure((Ifc4.MeasureResource.IfcCompoundPlaneAngleMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcCurvatureMeasure) 
				{
					NominalValue = new MeasureResource.IfcCurvatureMeasure((Ifc4.MeasureResource.IfcCurvatureMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcDoseEquivalentMeasure) 
				{
					NominalValue = new MeasureResource.IfcDoseEquivalentMeasure((Ifc4.MeasureResource.IfcDoseEquivalentMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcDynamicViscosityMeasure) 
				{
					NominalValue = new MeasureResource.IfcDynamicViscosityMeasure((Ifc4.MeasureResource.IfcDynamicViscosityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcElectricCapacitanceMeasure) 
				{
					NominalValue = new MeasureResource.IfcElectricCapacitanceMeasure((Ifc4.MeasureResource.IfcElectricCapacitanceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcElectricChargeMeasure) 
				{
					NominalValue = new MeasureResource.IfcElectricChargeMeasure((Ifc4.MeasureResource.IfcElectricChargeMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcElectricConductanceMeasure) 
				{
					NominalValue = new MeasureResource.IfcElectricConductanceMeasure((Ifc4.MeasureResource.IfcElectricConductanceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcElectricResistanceMeasure) 
				{
					NominalValue = new MeasureResource.IfcElectricResistanceMeasure((Ifc4.MeasureResource.IfcElectricResistanceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcElectricVoltageMeasure) 
				{
					NominalValue = new MeasureResource.IfcElectricVoltageMeasure((Ifc4.MeasureResource.IfcElectricVoltageMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcEnergyMeasure) 
				{
					NominalValue = new MeasureResource.IfcEnergyMeasure((Ifc4.MeasureResource.IfcEnergyMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcForceMeasure) 
				{
					NominalValue = new MeasureResource.IfcForceMeasure((Ifc4.MeasureResource.IfcForceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcFrequencyMeasure) 
				{
					NominalValue = new MeasureResource.IfcFrequencyMeasure((Ifc4.MeasureResource.IfcFrequencyMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcHeatFluxDensityMeasure) 
				{
					NominalValue = new MeasureResource.IfcHeatFluxDensityMeasure((Ifc4.MeasureResource.IfcHeatFluxDensityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcHeatingValueMeasure) 
				{
					NominalValue = new MeasureResource.IfcHeatingValueMeasure((Ifc4.MeasureResource.IfcHeatingValueMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcIlluminanceMeasure) 
				{
					NominalValue = new MeasureResource.IfcIlluminanceMeasure((Ifc4.MeasureResource.IfcIlluminanceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcInductanceMeasure) 
				{
					NominalValue = new MeasureResource.IfcInductanceMeasure((Ifc4.MeasureResource.IfcInductanceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcIntegerCountRateMeasure) 
				{
					NominalValue = new MeasureResource.IfcIntegerCountRateMeasure((Ifc4.MeasureResource.IfcIntegerCountRateMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcIonConcentrationMeasure) 
				{
					NominalValue = new MeasureResource.IfcIonConcentrationMeasure((Ifc4.MeasureResource.IfcIonConcentrationMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcIsothermalMoistureCapacityMeasure) 
				{
					NominalValue = new MeasureResource.IfcIsothermalMoistureCapacityMeasure((Ifc4.MeasureResource.IfcIsothermalMoistureCapacityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcKinematicViscosityMeasure) 
				{
					NominalValue = new MeasureResource.IfcKinematicViscosityMeasure((Ifc4.MeasureResource.IfcKinematicViscosityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLinearForceMeasure) 
				{
					NominalValue = new MeasureResource.IfcLinearForceMeasure((Ifc4.MeasureResource.IfcLinearForceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLinearMomentMeasure) 
				{
					NominalValue = new MeasureResource.IfcLinearMomentMeasure((Ifc4.MeasureResource.IfcLinearMomentMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLinearStiffnessMeasure) 
				{
					NominalValue = new MeasureResource.IfcLinearStiffnessMeasure((Ifc4.MeasureResource.IfcLinearStiffnessMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLinearVelocityMeasure) 
				{
					NominalValue = new MeasureResource.IfcLinearVelocityMeasure((Ifc4.MeasureResource.IfcLinearVelocityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLuminousFluxMeasure) 
				{
					NominalValue = new MeasureResource.IfcLuminousFluxMeasure((Ifc4.MeasureResource.IfcLuminousFluxMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLuminousIntensityDistributionMeasure) 
				{
					NominalValue = new MeasureResource.IfcLuminousIntensityDistributionMeasure((Ifc4.MeasureResource.IfcLuminousIntensityDistributionMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMagneticFluxDensityMeasure) 
				{
					NominalValue = new MeasureResource.IfcMagneticFluxDensityMeasure((Ifc4.MeasureResource.IfcMagneticFluxDensityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMagneticFluxMeasure) 
				{
					NominalValue = new MeasureResource.IfcMagneticFluxMeasure((Ifc4.MeasureResource.IfcMagneticFluxMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMassDensityMeasure) 
				{
					NominalValue = new MeasureResource.IfcMassDensityMeasure((Ifc4.MeasureResource.IfcMassDensityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMassFlowRateMeasure) 
				{
					NominalValue = new MeasureResource.IfcMassFlowRateMeasure((Ifc4.MeasureResource.IfcMassFlowRateMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMassPerLengthMeasure) 
				{
					NominalValue = new MeasureResource.IfcMassPerLengthMeasure((Ifc4.MeasureResource.IfcMassPerLengthMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcModulusOfElasticityMeasure) 
				{
					NominalValue = new MeasureResource.IfcModulusOfElasticityMeasure((Ifc4.MeasureResource.IfcModulusOfElasticityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure) 
				{
					NominalValue = new MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure((Ifc4.MeasureResource.IfcModulusOfLinearSubgradeReactionMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure) 
				{
					NominalValue = new MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure((Ifc4.MeasureResource.IfcModulusOfRotationalSubgradeReactionMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcModulusOfSubgradeReactionMeasure) 
				{
					NominalValue = new MeasureResource.IfcModulusOfSubgradeReactionMeasure((Ifc4.MeasureResource.IfcModulusOfSubgradeReactionMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMoistureDiffusivityMeasure) 
				{
					NominalValue = new MeasureResource.IfcMoistureDiffusivityMeasure((Ifc4.MeasureResource.IfcMoistureDiffusivityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMolecularWeightMeasure) 
				{
					NominalValue = new MeasureResource.IfcMolecularWeightMeasure((Ifc4.MeasureResource.IfcMolecularWeightMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMomentOfInertiaMeasure) 
				{
					NominalValue = new MeasureResource.IfcMomentOfInertiaMeasure((Ifc4.MeasureResource.IfcMomentOfInertiaMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMonetaryMeasure) 
				{
					NominalValue = new MeasureResource.IfcMonetaryMeasure((Ifc4.MeasureResource.IfcMonetaryMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcPHMeasure) 
				{
					NominalValue = new MeasureResource.IfcPHMeasure((Ifc4.MeasureResource.IfcPHMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcPlanarForceMeasure) 
				{
					NominalValue = new MeasureResource.IfcPlanarForceMeasure((Ifc4.MeasureResource.IfcPlanarForceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcPowerMeasure) 
				{
					NominalValue = new MeasureResource.IfcPowerMeasure((Ifc4.MeasureResource.IfcPowerMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcPressureMeasure) 
				{
					NominalValue = new MeasureResource.IfcPressureMeasure((Ifc4.MeasureResource.IfcPressureMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcRadioActivityMeasure) 
				{
					NominalValue = new MeasureResource.IfcRadioActivityMeasure((Ifc4.MeasureResource.IfcRadioActivityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcRotationalFrequencyMeasure) 
				{
					NominalValue = new MeasureResource.IfcRotationalFrequencyMeasure((Ifc4.MeasureResource.IfcRotationalFrequencyMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcRotationalMassMeasure) 
				{
					NominalValue = new MeasureResource.IfcRotationalMassMeasure((Ifc4.MeasureResource.IfcRotationalMassMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcRotationalStiffnessMeasure) 
				{
					NominalValue = new MeasureResource.IfcRotationalStiffnessMeasure((Ifc4.MeasureResource.IfcRotationalStiffnessMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcSectionModulusMeasure) 
				{
					NominalValue = new MeasureResource.IfcSectionModulusMeasure((Ifc4.MeasureResource.IfcSectionModulusMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcSectionalAreaIntegralMeasure) 
				{
					NominalValue = new MeasureResource.IfcSectionalAreaIntegralMeasure((Ifc4.MeasureResource.IfcSectionalAreaIntegralMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcShearModulusMeasure) 
				{
					NominalValue = new MeasureResource.IfcShearModulusMeasure((Ifc4.MeasureResource.IfcShearModulusMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcSoundPowerLevelMeasure) 
				{
					NominalValue = new MeasureResource.IfcSoundPowerMeasure((Ifc4.MeasureResource.IfcSoundPowerLevelMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcSoundPowerMeasure) 
				{
					NominalValue = new MeasureResource.IfcSoundPowerMeasure((Ifc4.MeasureResource.IfcSoundPowerMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcSoundPressureLevelMeasure) 
				{
					NominalValue = new MeasureResource.IfcSoundPressureMeasure((Ifc4.MeasureResource.IfcSoundPressureLevelMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcSoundPressureMeasure) 
				{
					NominalValue = new MeasureResource.IfcSoundPressureMeasure((Ifc4.MeasureResource.IfcSoundPressureMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcSpecificHeatCapacityMeasure) 
				{
					NominalValue = new MeasureResource.IfcSpecificHeatCapacityMeasure((Ifc4.MeasureResource.IfcSpecificHeatCapacityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcTemperatureGradientMeasure) 
				{
					NominalValue = new MeasureResource.IfcTemperatureGradientMeasure((Ifc4.MeasureResource.IfcTemperatureGradientMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcTemperatureRateOfChangeMeasure) 
				{
					if (NominalValue != null)
						NominalValue = null;
					SetValue(v => _nominalValue4 = v, _nominalValue4, value, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcThermalAdmittanceMeasure) 
				{
					NominalValue = new MeasureResource.IfcThermalAdmittanceMeasure((Ifc4.MeasureResource.IfcThermalAdmittanceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcThermalConductivityMeasure) 
				{
					NominalValue = new MeasureResource.IfcThermalConductivityMeasure((Ifc4.MeasureResource.IfcThermalConductivityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcThermalExpansionCoefficientMeasure) 
				{
					NominalValue = new MeasureResource.IfcThermalExpansionCoefficientMeasure((Ifc4.MeasureResource.IfcThermalExpansionCoefficientMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcThermalResistanceMeasure) 
				{
					NominalValue = new MeasureResource.IfcThermalResistanceMeasure((Ifc4.MeasureResource.IfcThermalResistanceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcThermalTransmittanceMeasure) 
				{
					NominalValue = new MeasureResource.IfcThermalTransmittanceMeasure((Ifc4.MeasureResource.IfcThermalTransmittanceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcTorqueMeasure) 
				{
					NominalValue = new MeasureResource.IfcTorqueMeasure((Ifc4.MeasureResource.IfcTorqueMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcVaporPermeabilityMeasure) 
				{
					NominalValue = new MeasureResource.IfcVaporPermeabilityMeasure((Ifc4.MeasureResource.IfcVaporPermeabilityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcVolumetricFlowRateMeasure) 
				{
					NominalValue = new MeasureResource.IfcVolumetricFlowRateMeasure((Ifc4.MeasureResource.IfcVolumetricFlowRateMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcWarpingConstantMeasure) 
				{
					NominalValue = new MeasureResource.IfcWarpingConstantMeasure((Ifc4.MeasureResource.IfcWarpingConstantMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcWarpingMomentMeasure) 
				{
					NominalValue = new MeasureResource.IfcWarpingMomentMeasure((Ifc4.MeasureResource.IfcWarpingMomentMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcAmountOfSubstanceMeasure) 
				{
					NominalValue = new MeasureResource.IfcAmountOfSubstanceMeasure((Ifc4.MeasureResource.IfcAmountOfSubstanceMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcAreaMeasure) 
				{
					NominalValue = new MeasureResource.IfcAreaMeasure((Ifc4.MeasureResource.IfcAreaMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcComplexNumber) 
				{
					NominalValue = new MeasureResource.IfcComplexNumber((Ifc4.MeasureResource.IfcComplexNumber)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcContextDependentMeasure) 
				{
					NominalValue = new MeasureResource.IfcContextDependentMeasure((Ifc4.MeasureResource.IfcContextDependentMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcCountMeasure) 
				{
					NominalValue = new MeasureResource.IfcCountMeasure((Ifc4.MeasureResource.IfcCountMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcDescriptiveMeasure) 
				{
					NominalValue = new MeasureResource.IfcDescriptiveMeasure((Ifc4.MeasureResource.IfcDescriptiveMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcElectricCurrentMeasure) 
				{
					NominalValue = new MeasureResource.IfcElectricCurrentMeasure((Ifc4.MeasureResource.IfcElectricCurrentMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLengthMeasure) 
				{
					NominalValue = new MeasureResource.IfcLengthMeasure((Ifc4.MeasureResource.IfcLengthMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLuminousIntensityMeasure) 
				{
					NominalValue = new MeasureResource.IfcLuminousIntensityMeasure((Ifc4.MeasureResource.IfcLuminousIntensityMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcMassMeasure) 
				{
					NominalValue = new MeasureResource.IfcMassMeasure((Ifc4.MeasureResource.IfcMassMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcNonNegativeLengthMeasure) 
				{
					if (NominalValue != null)
						NominalValue = null;
					SetValue(v => _nominalValue4 = v, _nominalValue4, value, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcNormalisedRatioMeasure) 
				{
					NominalValue = new MeasureResource.IfcNormalisedRatioMeasure((Ifc4.MeasureResource.IfcNormalisedRatioMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcNumericMeasure) 
				{
					NominalValue = new MeasureResource.IfcNumericMeasure((Ifc4.MeasureResource.IfcNumericMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcParameterValue) 
				{
					NominalValue = new MeasureResource.IfcParameterValue((Ifc4.MeasureResource.IfcParameterValue)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcPlaneAngleMeasure) 
				{
					NominalValue = new MeasureResource.IfcPlaneAngleMeasure((Ifc4.MeasureResource.IfcPlaneAngleMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcPositiveLengthMeasure) 
				{
					NominalValue = new MeasureResource.IfcPositiveLengthMeasure((Ifc4.MeasureResource.IfcPositiveLengthMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcPositivePlaneAngleMeasure) 
				{
					NominalValue = new MeasureResource.IfcPositivePlaneAngleMeasure((Ifc4.MeasureResource.IfcPositivePlaneAngleMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcPositiveRatioMeasure) 
				{
					NominalValue = new MeasureResource.IfcPositiveRatioMeasure((Ifc4.MeasureResource.IfcPositiveRatioMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcRatioMeasure) 
				{
					NominalValue = new MeasureResource.IfcRatioMeasure((Ifc4.MeasureResource.IfcRatioMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcSolidAngleMeasure) 
				{
					NominalValue = new MeasureResource.IfcSolidAngleMeasure((Ifc4.MeasureResource.IfcSolidAngleMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcThermodynamicTemperatureMeasure) 
				{
					NominalValue = new MeasureResource.IfcThermodynamicTemperatureMeasure((Ifc4.MeasureResource.IfcThermodynamicTemperatureMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcTimeMeasure) 
				{
					NominalValue = new MeasureResource.IfcTimeMeasure((Ifc4.MeasureResource.IfcTimeMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcVolumeMeasure) 
				{
					NominalValue = new MeasureResource.IfcVolumeMeasure((Ifc4.MeasureResource.IfcVolumeMeasure)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcBinary) 
				{
					if (NominalValue != null)
						NominalValue = null;
					SetValue(v => _nominalValue4 = v, _nominalValue4, value, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcBoolean) 
				{
					NominalValue = new MeasureResource.IfcBoolean((Ifc4.MeasureResource.IfcBoolean)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.DateTimeResource.IfcDate) 
				{
					if (NominalValue != null)
						NominalValue = null;
					SetValue(v => _nominalValue4 = v, _nominalValue4, value, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.DateTimeResource.IfcDateTime) 
				{
					if (NominalValue != null)
						NominalValue = null;
					SetValue(v => _nominalValue4 = v, _nominalValue4, value, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.DateTimeResource.IfcDuration) 
				{
					if (NominalValue != null)
						NominalValue = null;
					SetValue(v => _nominalValue4 = v, _nominalValue4, value, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcIdentifier) 
				{
					NominalValue = new MeasureResource.IfcIdentifier((Ifc4.MeasureResource.IfcIdentifier)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcInteger) 
				{
					NominalValue = new MeasureResource.IfcInteger((Ifc4.MeasureResource.IfcInteger)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLabel) 
				{
					NominalValue = new MeasureResource.IfcLabel((Ifc4.MeasureResource.IfcLabel)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcLogical) 
				{
					NominalValue = new MeasureResource.IfcLogical((Ifc4.MeasureResource.IfcLogical)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcPositiveInteger) 
				{
					if (NominalValue != null)
						NominalValue = null;
					SetValue(v => _nominalValue4 = v, _nominalValue4, value, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcReal) 
				{
					NominalValue = new MeasureResource.IfcReal((Ifc4.MeasureResource.IfcReal)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.MeasureResource.IfcText) 
				{
					NominalValue = new MeasureResource.IfcText((Ifc4.MeasureResource.IfcText)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.DateTimeResource.IfcTime) 
				{
					if (NominalValue != null)
						NominalValue = null;
					SetValue(v => _nominalValue4 = v, _nominalValue4, value, "NominalValue", -3);
					return;
				}
				if (value is Ifc4.DateTimeResource.IfcTimeStamp) 
				{
					NominalValue = new MeasureResource.IfcTimeStamp((Ifc4.DateTimeResource.IfcTimeStamp)value);
					if (_nominalValue4 != null)
						SetValue(v => _nominalValue4 = v, _nominalValue4, null, "NominalValue", -3);
					return;
				}
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcPropertySingleValue), 4)]
		IIfcUnit IIfcPropertySingleValue.Unit 
		{ 
			get
			{
				if (Unit == null) return null;
				var ifcderivedunit = Unit as MeasureResource.IfcDerivedUnit;
				if (ifcderivedunit != null) 
					return ifcderivedunit;
				var ifcnamedunit = Unit as MeasureResource.IfcNamedUnit;
				if (ifcnamedunit != null) 
					return ifcnamedunit;
				var ifcmonetaryunit = Unit as MeasureResource.IfcMonetaryUnit;
				if (ifcmonetaryunit != null) 
					return ifcmonetaryunit;
				return null;
			} 
			set
			{
				if (value == null)
				{
					Unit = null;
					return;
				}	
				var ifcderivedunit = value as MeasureResource.IfcDerivedUnit;
				if (ifcderivedunit != null) 
				{
					Unit = ifcderivedunit;
					return;
				}
				var ifcmonetaryunit = value as MeasureResource.IfcMonetaryUnit;
				if (ifcmonetaryunit != null) 
				{
					Unit = ifcmonetaryunit;
					return;
				}
				var ifcnamedunit = value as MeasureResource.IfcNamedUnit;
				if (ifcnamedunit != null) 
				{
					Unit = ifcnamedunit;
					return;
				}
				
			}
		}
		IEnumerable<IIfcExternalReferenceRelationship> IIfcPropertyAbstraction.HasExternalReferences 
		{ 
			get
			{
				return Model.Instances.Where<IIfcExternalReferenceRelationship>(e => e.RelatedResourceObjects != null &&  e.RelatedResourceObjects.Contains(this), "RelatedResourceObjects", this);
			} 
		}
	//## Custom code
	//##
	}
}