Ejemplo n.º 1
0
        /// <summary>
        /// Create the PropertySetEntry for "SurfaceSpreadOfFlame", which is used by many property sets.
        /// </summary>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateSurfaceSpreadOfFlameEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateLabel("SurfaceSpreadOfFlame");

            ifcPSE.AddLocalizedParameterName(LanguageType.French, "SurfacePropagationFlamme");
            ifcPSE.AddLocalizedParameterName(LanguageType.German, "Brandverhalten");
            return(ifcPSE);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates an entry of type list value.
        /// The type of the list value is also given.
        /// </summary>
        /// <param name="revitParameterName">Revit parameter name.</param>
        /// <param name="propertyType">The property type.</param>
        /// <returns>The PropertySetEntry.</returns>
        public static PropertySetEntry CreateListValue(string revitParameterName, PropertyType propertyType)
        {
            PropertySetEntry pse = new PropertySetEntry(revitParameterName);

            pse.PropertyType      = propertyType;
            pse.PropertyValueType = PropertyValueType.ListValue;
            return(pse);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create the PropertySetEntry for "Combustible", which is used by many property sets.
        /// </summary>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateCombustibleEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateBoolean("Combustible");

            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "是否可燃");
            ifcPSE.AddLocalizedParameterName(LanguageType.German, "BrennbaresMaterial");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "可燃性区分");
            return(ifcPSE);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Create the PropertySetEntry for "Compartmentation", which is used by some property sets.
        /// </summary>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateCompartmentationEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateBoolean("Compartmentation");

            ifcPSE.AddLocalizedParameterName(LanguageType.French, "Compartimentage");
            ifcPSE.AddLocalizedParameterName(LanguageType.German, "BrandabschnittsdefinierendesBauteil");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "防火区画");
            return(ifcPSE);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Create the PropertySetEntry for "ExtendToStructure".
        /// </summary>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateExtendToStructureEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateBoolean("ExtendToStructure");

            ifcPSE.AddLocalizedParameterName(LanguageType.French, "ExtensionStructure");
            ifcPSE.AddLocalizedParameterName(LanguageType.German, "RaumhoheWand");
            ifcPSE.PropertyCalculator = ExtendToStructureCalculator.Instance;
            return(ifcPSE);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Create the PropertySetEntry for "AcousticRating", which is used by many property sets.
        /// </summary>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateAcousticRatingEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateLabel("AcousticRating");

            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "隔音等级");
            ifcPSE.AddLocalizedParameterName(LanguageType.French, "IsolationAcoustique");
            ifcPSE.AddLocalizedParameterName(LanguageType.German, "Schallschutzklasse");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "遮音等級");
            return(ifcPSE);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Create the PropertySetEntry for "Reference", which is used by many property sets.
        /// </summary>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateReferenceEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateIdentifier("Reference");

            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "参考号");
            ifcPSE.AddLocalizedParameterName(LanguageType.German, "Bauteiltyp");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "参照記号");
            ifcPSE.PropertyCalculator = ReferenceCalculator.Instance;
            return(ifcPSE);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Create the PropertySetEntry for "ThermalTransmittance", which is used by many property sets.
        /// </summary>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateThermalTransmittanceEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateThermalTransmittance("ThermalTransmittance");

            ifcPSE.RevitBuiltInParameter = BuiltInParameter.ANALYTICAL_HEAT_TRANSFER_COEFFICIENT;
            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "导热系数");
            ifcPSE.AddLocalizedParameterName(LanguageType.French, "TransmissionThermique");
            ifcPSE.AddLocalizedParameterName(LanguageType.German, "U-Wert");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "熱貫流率");
            return(ifcPSE);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Create the PropertySetEntry for "LoadBearing", which is used by many property sets.
        /// </summary>
        /// <param name="calc">The appropriate calculator for the element type associated with this entry.</param>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateLoadBearingEntry(PropertyCalculator calc)
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateBoolean("LoadBearing");

            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "是否承重");
            ifcPSE.AddLocalizedParameterName(LanguageType.French, "Porteur");
            ifcPSE.AddLocalizedParameterName(LanguageType.German, "TragendesBauteil");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "耐力部材");
            ifcPSE.PropertyCalculator = calc;
            return(ifcPSE);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Create the PropertySetEntry for "IsExternal", which is used by many property sets.
        /// </summary>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateIsExternalEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateBoolean("IsExternal");

            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, GetLocalizedIsExternal(LanguageType.Chinese_Simplified));
            ifcPSE.AddLocalizedParameterName(LanguageType.French, GetLocalizedIsExternal(LanguageType.French));
            ifcPSE.AddLocalizedParameterName(LanguageType.German, GetLocalizedIsExternal(LanguageType.German));
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, GetLocalizedIsExternal(LanguageType.Japanese));
            ifcPSE.PropertyCalculator = ExternalCalculator.Instance;
            return(ifcPSE);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Create the PropertySetEntry for "FireRating", which is used by many property sets.
        /// </summary>
        /// <returns>The correct PropertySetEntry.</returns>
        public static PropertySetEntry CreateFireRatingEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateLabel("FireRating");

            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "防火等级");
            ifcPSE.AddLocalizedParameterName(LanguageType.French, "ResistanceAuFeu");
            ifcPSE.AddLocalizedParameterName(LanguageType.German, "Feuerwiderstandsklasse");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "耐火等級");
            ifcPSE.RevitBuiltInParameter = BuiltInParameter.DOOR_FIRE_RATING;
            return(ifcPSE);
        }
        /// <summary>
        /// The entries stored in this property set description.
        /// </summary>
        public void AddEntry(PropertySetEntry entry)
        {
            //if the PropertySetDescription name and PropertySetEntry name are in the dictionary, 
            Tuple<string, string> key = new Tuple<string, string>(this.Name, entry.PropertyName);
            if (ExporterCacheManager.PropertyMapCache.ContainsKey(new Tuple<string, string>(this.Name, entry.PropertyName)))
            {
                //replace the PropertySetEntry.RevitParameterName by the value in the cache.
                entry.RevitParameterName = ExporterCacheManager.PropertyMapCache[key];
            }

            entry.UpdateEntry();
            m_Entries.Add(entry);
        }
        /// <summary>
        /// The entries stored in this property set description.
        /// </summary>
        public void AddEntry(PropertySetEntry entry)
        {
            //if the PropertySetDescription name and PropertySetEntry name are in the dictionary,
            Tuple <string, string> key = new Tuple <string, string>(this.Name, entry.PropertyName);

            if (ExporterCacheManager.PropertyMapCache.ContainsKey(new Tuple <string, string>(this.Name, entry.PropertyName)))
            {
                //replace the PropertySetEntry.RevitParameterName by the value in the cache.
                entry.RevitParameterName = ExporterCacheManager.PropertyMapCache[key];
            }

            entry.UpdateEntry();
            m_Entries.Add(entry);
        }
 /// <summary>
 /// Creates an external reference to IfcClassificationReference.
 /// </summary>
 /// <param name="revitParameterName">Revit parameter name.</param>
 /// <returns>The PropertySetEntry.</returns>
 public static PropertySetEntry CreateClassificationReference(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.ClassificationReference;
     pse.PropertyValueType = PropertyValueType.ReferenceValue;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type enumerated value.
 /// The type of the enumarated value is also given.
 /// Note that the enumeration list is not supported here.
 /// </summary>
 /// <param name="revitParameterName">
 /// Revit parameter name.
 /// </param>
 /// <param name="propertyType">
 /// The property type.
 /// </param>
 /// <returns>
 /// The PropertySetEntry.
 /// </returns>
 public static PropertySetEntry CreateEnumeratedValue(string revitParameterName, PropertyType propertyType, Type enumType)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = propertyType;
     pse.PropertyValueType = PropertyValueType.EnumeratedValue;
     pse.PropertyEnumerationType = enumType;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type integer.
 /// </summary>
 /// <param name="revitParameterName">
 /// Revit parameter name.
 /// </param>
 /// <returns>
 /// The PropertySetEntry.
 /// </returns>
 public static PropertySetEntry CreateInteger(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.Integer;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type logical.
 /// </summary>
 /// <param name="revitParameterName">
 /// Revit parameter name.
 /// </param>
 /// <returns>
 /// The PropertySetEntry.
 /// </returns>
 public static PropertySetEntry CreateLogical(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.Logical;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type boolean.
 /// </summary>
 /// <param name="revitParameterName">
 /// Revit parameter name.
 /// </param>
 /// <returns>
 /// The PropertySetEntry.
 /// </returns>
 public static PropertySetEntry CreateBoolean(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.Boolean;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type ThermalTransmittance.
 /// </summary>
 /// <param name="revitParameterName">Revit parameter name.</param>
 /// <returns>The PropertySetEntry.</returns>
 public static PropertySetEntry CreateThermalTransmittance(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.ThermalTransmittance;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type ThermodynamicTemperature.
 /// </summary>
 /// <param name="revitParameterName">Revit parameter name.</param>
 /// <returns>The PropertySetEntry.</returns>
 public static PropertySetEntry CreateThermodynamicTemperature(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.ThermodynamicTemperature;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type VolumetricFlowRate.
 /// </summary>
 /// <param name="revitParameterName">Revit parameter name.</param>
 /// <returns>The PropertySetEntry.</returns>
 public static PropertySetEntry CreateVolumetricFlowRate(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.VolumetricFlowRate;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type ElectricalVoltage.
 /// </summary>
 /// <param name="revitParameterName">Revit parameter name.</param>
 /// <returns>The PropertySetEntry.</returns>
 public static PropertySetEntry CreateElectricalVoltage(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.ElectricalVoltage;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type count.
 /// </summary>
 /// <param name="revitParameterName">Revit parameter name.</param>
 /// <returns>The PropertySetEntry.</returns>
 public static PropertySetEntry CreateCount(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.Count;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type list value.
 /// The type of the list value is also given.
 /// </summary>
 /// <param name="revitParameterName">Revit parameter name.</param>
 /// <param name="propertyType">The property type.</param>
 /// <returns>The PropertySetEntry.</returns>
 public static PropertySetEntry CreateListValue(string revitParameterName, PropertyType propertyType)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = propertyType;
     pse.PropertyValueType = PropertyValueType.ListValue;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type positive plane angle.
 /// </summary>
 /// <param name="revitParameterName">
 /// Revit parameter name.
 /// </param>
 /// <returns>
 /// The PropertySetEntry.
 /// </returns>
 public static PropertySetEntry CreatePositivePlaneAngle(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.PositivePlaneAngle;
     return pse;
 }
 /// <summary>
 /// Creates an entry of type Frequency.
 /// </summary>
 /// <param name="revitParameterName">Revit parameter name.</param>
 /// <returns>The PropertySetEntry.</returns>
 public static PropertySetEntry CreateFrequency(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.Frequency;
     return pse;
 }
        /// <summary>
        /// Creates an entry for a given parameter.
        /// </summary>
        /// <param name="parameter">Revit parameter.</param>
        /// <returns>The PropertySetEntry.</returns>
        public static PropertySetEntry CreateParameterEntry(Parameter parameter)
        {
            Definition parameterDefinition = parameter.Definition;
            if (parameterDefinition == null)
                return null;

            PropertySetEntry pse = new PropertySetEntry(parameterDefinition.Name);
            switch (parameter.StorageType)
            {
                case StorageType.None:
                    return null;
                case StorageType.Integer:
                    {
                        // YesNo or actual integer?
                        if (parameterDefinition.ParameterType == ParameterType.YesNo)
                            pse.PropertyType = PropertyType.Boolean;
                        else if (parameterDefinition.ParameterType == ParameterType.Invalid)
                            pse.PropertyType = PropertyType.Identifier;
                        else
                            pse.PropertyType = PropertyType.Count;
                        break;
                    }
                case StorageType.Double:
                    {
                        bool assigned = true;
                        switch (parameterDefinition.ParameterType)
                        {
                            case ParameterType.Angle:
                                pse.PropertyType = PropertyType.PlaneAngle;
                                break;
                            case ParameterType.Area:
                            case ParameterType.HVACCrossSection:
                            case ParameterType.ReinforcementArea:
                            case ParameterType.SectionArea:
                            case ParameterType.SurfaceArea:
                                pse.PropertyType = PropertyType.Area;
                                break;
                            case ParameterType.BarDiameter:
                            case ParameterType.CrackWidth:
                            case ParameterType.DisplacementDeflection:
                            case ParameterType.ElectricalCableTraySize:
                            case ParameterType.ElectricalConduitSize:
                            case ParameterType.Length:
                            case ParameterType.HVACDuctInsulationThickness:
                            case ParameterType.HVACDuctLiningThickness:
                            case ParameterType.HVACDuctSize:
                            case ParameterType.HVACRoughness:
                            case ParameterType.PipeInsulationThickness:
                            case ParameterType.PipeSize:
                            case ParameterType.PipingRoughness:
                            case ParameterType.ReinforcementCover:
                            case ParameterType.ReinforcementLength:
                            case ParameterType.ReinforcementSpacing:
                            case ParameterType.SectionDimension:
                            case ParameterType.SectionProperty:
                            case ParameterType.WireSize:
                                pse.PropertyType = PropertyType.Length;
                                break;
                            case ParameterType.ColorTemperature:
                                pse.PropertyType = PropertyType.ColorTemperature;
                                break;
                            case ParameterType.Currency:
                                pse.PropertyType = PropertyType.Currency;
                                break;
                            case ParameterType.ElectricalEfficacy:
                                pse.PropertyType = PropertyType.ElectricalEfficacy;
                                break;
                            case ParameterType.ElectricalLuminousIntensity:
                                pse.PropertyType = PropertyType.LuminousIntensity;
                                break;
                            case ParameterType.ElectricalIlluminance:
                                pse.PropertyType = PropertyType.Illuminance;
                                break;
                            case ParameterType.ElectricalApparentPower:
                            case ParameterType.ElectricalPower:
                            case ParameterType.ElectricalWattage:
                            case ParameterType.HVACPower:
                                pse.PropertyType = PropertyType.Power;
                                break;
                            case ParameterType.ElectricalCurrent:
                                pse.PropertyType = PropertyType.ElectricalCurrent;
                                break;
                            case ParameterType.ElectricalPotential:
                                pse.PropertyType = PropertyType.ElectricalVoltage;
                                break;
                            case ParameterType.ElectricalFrequency:
                                pse.PropertyType = PropertyType.Frequency;
                                break;
                            case ParameterType.ElectricalLuminousFlux:
                                pse.PropertyType = PropertyType.LuminousFlux;
                                break;
                            case ParameterType.ElectricalTemperature:
                            case ParameterType.HVACTemperature:
                            case ParameterType.PipingTemperature:
                                pse.PropertyType = PropertyType.ThermodynamicTemperature;
                                break;
                            case ParameterType.Force:
                                pse.PropertyType = PropertyType.Force;
                                break;
                            case ParameterType.HVACAirflow:
                            case ParameterType.PipingFlow:
                                pse.PropertyType = PropertyType.VolumetricFlowRate;
                                break;
                            case ParameterType.HVACPressure:
                            case ParameterType.PipingPressure:
                            case ParameterType.Stress:
                                pse.PropertyType = PropertyType.Pressure;
                                break;
                            case ParameterType.PipingVolume:
                            case ParameterType.ReinforcementVolume:
                            case ParameterType.SectionModulus:
                            case ParameterType.Volume:
                                pse.PropertyType = PropertyType.Volume;
                                break;
                            default:
                                assigned = false;
                                break;
                        }

                        if (!assigned)
                            pse.PropertyType = PropertyType.Real;
                        break;
                    }
                case StorageType.String:
                    {
                        pse.PropertyType = PropertyType.Text;
                        break;
                    }
                case StorageType.ElementId:
                    {
                        pse.PropertyType = PropertyType.Label;
                        break;
                    }
            }            
            
            return pse;
        }
Ejemplo n.º 28
0
 /// <summary>
 /// The entries stored in this property set description.
 /// </summary>
 public void AddEntry(PropertySetEntry entry)
 {
     entry.UpdateEntry();
     m_Entries.Add(entry);
 }