internal static bool TryGetDouble(IfcValue v, out double val) { IfcReal r = v as IfcReal; if (r != null) { val = r.mValue; return(true); } IfcInteger i = v as IfcInteger; if (i != null) { val = i.mValue; return(true); } IfcPositiveLengthMeasure plm = v as IfcPositiveLengthMeasure; if (plm != null) { val = plm.mValue; return(true); } IfcDynamicViscosityMeasure dvm = v as IfcDynamicViscosityMeasure; if (dvm != null) { val = dvm.mValue; return(true); } IfcMassDensityMeasure mdm = v as IfcMassDensityMeasure; if (mdm != null) { val = mdm.mValue; return(true); } IfcModulusOfElasticityMeasure mem = v as IfcModulusOfElasticityMeasure; if (mem != null) { val = mem.mValue; return(true); } IfcPositiveRatioMeasure prm = v as IfcPositiveRatioMeasure; if (prm != null) { val = prm.mValue; return(true); } IfcThermalExpansionCoefficientMeasure tec = v as IfcThermalExpansionCoefficientMeasure; if (tec != null) { val = tec.mValue; return(true); } val = 0; return(false); }