Beispiel #1
0
        /// <summary>
        /// Creates an entry of type label.
        /// </summary>
        /// <param name="revitParameterName">
        /// Revit parameter name.
        /// </param>
        /// <returns>
        /// The PropertySetEntry.
        /// </returns>
        public static PropertySetEntry CreateLabel(string revitParameterName)
        {
            PropertySetEntry pse = new PropertySetEntry(revitParameterName);

            pse.PropertyType = PropertyType.Label;
            return(pse);
        }
Beispiel #2
0
        /// <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);
        }
Beispiel #3
0
        /// <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);
        }
Beispiel #4
0
        /// <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);
        }
Beispiel #5
0
        /// <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);
        }
Beispiel #6
0
        /// <summary>
        /// Creates an entry of type ElectricalVoltage.
        /// </summary>
        /// <param name="revitParameterName">Revit parameter name.</param>
        /// <returns>The PropertySetEntry.</returns>
        public static PropertySetEntry CreateElectricVoltage(string revitParameterName)
        {
            PropertySetEntry pse = new PropertySetEntry(revitParameterName);

            pse.PropertyType = PropertyType.ElectricVoltage;
            return(pse);
        }
Beispiel #7
0
        /// <summary>
        /// Creates an entry of type Illuminance.
        /// </summary>
        /// <param name="revitParameterName">Revit parameter name.</param>
        /// <returns>The PropertySetEntry.</returns>
        public static PropertySetEntry CreateIlluminance(string revitParameterName)
        {
            PropertySetEntry pse = new PropertySetEntry(revitParameterName);

            pse.PropertyType = PropertyType.Illuminance;
            return(pse);
        }
Beispiel #8
0
        /// <summary>
        /// Creates an entry of type given by propertyType.
        /// </summary>
        /// <param name="propetyType">The property type.</param>
        /// <param name="revitParameterName">Revit parameter name.</param>
        /// <returns>The PropertySetEntry.</returns>
        public static PropertySetEntry CreateGenericEntry(PropertyType propertyType, string revitParameterName)
        {
            PropertySetEntry pse = new PropertySetEntry(revitParameterName);

            pse.PropertyType = propertyType;
            return(pse);
        }
Beispiel #9
0
        /// <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 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, PropertySetEntryMap entry)
        {
            PropertySetEntry pse = new PropertySetEntry(propertyType, revitParameterName, entry);

            pse.PropertyValueType = PropertyValueType.ListValue;
            return(pse);
        }
        /// <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(PropertyType.ClassificationReference, revitParameterName);

            pse.PropertyValueType = PropertyValueType.ReferenceValue;
            return(pse);
        }
        /// <summary>
        /// Creates an entry of type positive ratio.
        /// </summary>
        /// <param name="revitParameterName">
        /// Revit parameter name.
        /// </param>
        /// <returns>
        /// The PropertySetEntry.
        /// </returns>
        public static PropertySetEntry CreatePositiveRatio(string revitParameterName)
        {
            PropertySetEntry pse = new PropertySetEntry(revitParameterName);

            pse.PropertyType = PropertyType.PositiveRatio;
            return(pse);
        }
        /// <summary>
        /// Creates an entry of type linear velocity.
        /// </summary>
        /// <param name="revitParameterName">
        /// Revit parameter name.
        /// </param>
        /// <returns>
        /// The PropertySetEntry.
        /// </returns>
        public static PropertySetEntry CreateLinearVelocity(string revitParameterName)
        {
            PropertySetEntry pse = new PropertySetEntry(revitParameterName);

            pse.PropertyType = PropertyType.LinearVelocity;
            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);
        }
        public static PropertySetEntry CreateEnumeratedValue(string revitParameterName, PropertyType propertyType, Type enumType, PropertySetEntryMap entryMap)
        {
            PropertySetEntry pse = new PropertySetEntry(propertyType, revitParameterName, entryMap);

            pse.PropertyValueType       = PropertyValueType.EnumeratedValue;
            pse.PropertyEnumerationType = enumType;
            return(pse);
        }
        /// <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);
        }
        /// <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);
        }
Beispiel #18
0
        public static PropertySetEntry CreateParameterEntry(string propertyName,
                                                            IList <TableCellCombinedParameterData> combinedParameterData)
        {
            PropertySetEntry pse = new PropertySetEntry(propertyName);

            pse.PropertyType          = PropertyType.Text;
            pse.CombinedParameterData = combinedParameterData;
            return(pse);
        }
        /// <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);
        }
        /// <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);
        }
        /// <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);
        }
        public static PropertySetEntry CreateRollEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreatePlaneAngle("Roll");

            ifcPSE.AddLocalizedParameterName(LanguageType.German, "Kippwinkel");
            ifcPSE.AddLocalizedParameterName(LanguageType.French, "RotationAutourAxeLongitudinal");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "回転");
            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "转角");
            return(ifcPSE);
        }
        public static PropertySetEntry CreateSlopeEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreatePlaneAngle("Slope");

            ifcPSE.AddLocalizedParameterName(LanguageType.German, "Neigungswinkel");
            ifcPSE.AddLocalizedParameterName(LanguageType.French, "Inclinaison");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "傾斜");
            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "坡度");
            return(ifcPSE);
        }
        public static PropertySetEntry CreateSpanEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreatePositiveLength("Span");

            ifcPSE.AddLocalizedParameterName(LanguageType.German, "Spannweite");
            ifcPSE.AddLocalizedParameterName(LanguageType.French, "PorteeLibre");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "全長");
            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "跨度");
            return(ifcPSE);
        }
        /// <summary>
        /// Create PropertySetEntry for "HandicapAccessible", which is used by many property sets
        /// </summary>
        /// <returns></returns>
        public static PropertySetEntry CreateHandicapAccessibleEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateBoolean("HandicapAccessible");

            ifcPSE.AddLocalizedParameterName(LanguageType.German, "Behindertengerecht");
            ifcPSE.AddLocalizedParameterName(LanguageType.French, "AccessibleHandicapes");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "ハンディキャップアクセス可能性");
            ifcPSE.AddLocalizedParameterName(LanguageType.Chinese_Simplified, "是否为无障碍设施");
            return(ifcPSE);
        }
        /// <summary>
        /// Create PropertySetEntry for "Status", which is used by many property sets
        /// </summary>
        /// <returns></returns>
        public static PropertySetEntry CreateStatusEntry()
        {
            PropertySetEntry ifcPSE = PropertySetEntry.CreateEnumeratedValue("Status", PropertyType.Label,
                                                                             typeof(Toolkit.IFC4.PsetElementStatus));

            ifcPSE.AddLocalizedParameterName(LanguageType.German, "Status");
            ifcPSE.AddLocalizedParameterName(LanguageType.French, "Statut");
            ifcPSE.AddLocalizedParameterName(LanguageType.Japanese, "状態");
            return(ifcPSE);
        }
        /// <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.FIRE_RATING;
            return(ifcPSE);
        }
        /// <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);
        }
        /// <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);
        }
        /// <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);
        }
        /// <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 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 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 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 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 normalised ratio.
 /// </summary>
 /// <param name="revitParameterName">
 /// Revit parameter name.
 /// </param>
 /// <returns>
 /// The PropertySetEntry.
 /// </returns>
 public static PropertySetEntry CreateNormalisedRatio(string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = PropertyType.NormalisedRatio;
     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 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 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 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 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 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;
        }
 /// <summary>
 /// Creates an entry of type linear velocity.
 /// </summary>
 /// <param name="revitParameterName">
 /// Revit parameter name.
 /// </param>
 /// <returns>
 /// The PropertySetEntry.
 /// </returns>
 public static PropertySetEntry CreateLinearVelocity(string revitParameterName)
 {
    PropertySetEntry pse = new PropertySetEntry(revitParameterName);
    pse.PropertyType = PropertyType.LinearVelocity;
    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 of type given by propertyType.
 /// </summary>
 /// <param name="propetyType">The property type.</param>
 /// <param name="revitParameterName">Revit parameter name.</param>
 /// <returns>The PropertySetEntry.</returns>
 public static PropertySetEntry CreateGenericEntry(PropertyType propertyType, string revitParameterName)
 {
     PropertySetEntry pse = new PropertySetEntry(revitParameterName);
     pse.PropertyType = propertyType;
     return pse;
 }