当前位置: 首页>>代码示例>>C#>>正文


C# PropertySetDescription.AddEntry方法代码示例

本文整理汇总了C#中BIM.IFC.Exporter.PropertySet.PropertySetDescription.AddEntry方法的典型用法代码示例。如果您正苦于以下问题:C# PropertySetDescription.AddEntry方法的具体用法?C# PropertySetDescription.AddEntry怎么用?C# PropertySetDescription.AddEntry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BIM.IFC.Exporter.PropertySet.PropertySetDescription的用法示例。


在下文中一共展示了PropertySetDescription.AddEntry方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitPropertySetSanitaryTerminalTypeShower

        /// <summary>
        /// Initializes Pset_SanitaryTerminalTypeShower
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetSanitaryTerminalTypeShower(IList<PropertySetDescription> commonPropertySets)
        {
            PropertySetDescription propertySetShower = new PropertySetDescription();
            propertySetShower.Name = "Pset_SanitaryTerminalTypeShower";
            propertySetShower.EntityTypes.Add(IFCEntityType.IfcSanitaryTerminalType);
            propertySetShower.PredefinedType = "SHOWER";

            propertySetShower.AddEntry(PropertySetEntry.CreateEnumeratedValue("ShowerType", PropertyType.Label,
                typeof(PsetSanitaryTerminalTypeShower_ShowerType)));
            propertySetShower.AddEntry(PropertySetEntry.CreateBoolean("HasTray"));
            propertySetShower.AddEntry(PropertySetEntry.CreatePositiveLength("NominalLength"));
            propertySetShower.AddEntry(PropertySetEntry.CreatePositiveLength("NominalWidth"));
            propertySetShower.AddEntry(PropertySetEntry.CreatePositiveLength("NominalDepth"));

            //propertySetShower.AddEntry(PropertySetEntry.CreateMaterial("Material"));
            propertySetShower.AddEntry(PropertySetEntry.CreatePositiveLength("MaterialThickness"));
            propertySetShower.AddEntry(PropertySetEntry.CreateText("Color"));
            propertySetShower.AddEntry(PropertySetEntry.CreateText("ShowerHeadDescription")); 
            propertySetShower.AddEntry(PropertySetEntry.CreatePositiveLength("DrainSize"));
            
            commonPropertySets.Add(propertySetShower);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:26,代码来源:ExporterInitializer.cs

示例2: InitPropertySetReinforcingBarBendingsBECCommon

        /// <summary>
        /// Initializes Pset_ReinforcingBarBendingsBECCommon.
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetReinforcingBarBendingsBECCommon(IList<PropertySetDescription> commonPropertySets)
        {
            PropertySetDescription propertySetReinforcingBarCommon = new PropertySetDescription();
            propertySetReinforcingBarCommon.Name = "Pset_ReinforcingBarBendingsBECCommon";
            propertySetReinforcingBarCommon.SubElementIndex = (int)IFCCommonPSets.PSetBECCommon;

            propertySetReinforcingBarCommon.EntityTypes.Add(IFCEntityType.IfcReinforcingBar);

            propertySetReinforcingBarCommon.AddEntry(PropertySetEntry.CreateLabel("BECBarShapeCode"));
            for (char shapeParameterSuffix = 'a'; shapeParameterSuffix <= 'l'; shapeParameterSuffix++)
                propertySetReinforcingBarCommon.AddEntry(PropertySetEntry.CreatePositiveLength("BECShapeParameter_" + shapeParameterSuffix.ToString()));
            propertySetReinforcingBarCommon.AddEntry(PropertySetEntry.CreatePlaneAngle("BECBendingParameter_u"));
            propertySetReinforcingBarCommon.AddEntry(PropertySetEntry.CreatePlaneAngle("BECBendingParameter_v"));
            propertySetReinforcingBarCommon.AddEntry(PropertySetEntry.CreatePlaneAngle("BECBendingParameter_ul"));
            propertySetReinforcingBarCommon.AddEntry(PropertySetEntry.CreatePlaneAngle("BECBendingParameter_vl"));
            propertySetReinforcingBarCommon.AddEntry(PropertySetEntry.CreatePositiveLength("BECShapeAid_x"));
            propertySetReinforcingBarCommon.AddEntry(PropertySetEntry.CreatePositiveLength("BECShapeAid_y"));
            propertySetReinforcingBarCommon.AddEntry(PropertySetEntry.CreatePositiveLength("BECRollerDiameter"));
            
            commonPropertySets.Add(propertySetReinforcingBarCommon);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:25,代码来源:ExporterInitializer.cs

示例3: InitPropertySetReinforcingBarBendingsISOCD3766Common

        /// <summary>
        /// Initializes Pset_ReinforcingBarBendingsISOCD3766Common.
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetReinforcingBarBendingsISOCD3766Common(IList<PropertySetDescription> commonPropertySets)
        {
            PropertySetDescription propertySetReinforcingBarCommon = new PropertySetDescription();
            propertySetReinforcingBarCommon.Name = "Pset_ReinforcingBarBendingsISOCD3766Common";
            propertySetReinforcingBarCommon.SubElementIndex = (int)IFCCommonPSets.PSetISOCD3766Common;

            propertySetReinforcingBarCommon.EntityTypes.Add(IFCEntityType.IfcReinforcingBar);

            PropertySetEntry ifcPSE = PropertySetEntry.CreateLabel("ISOCD3766ShapeCode");
            ifcPSE.PropertyCalculator = ISOCD3766ShapeCodeCalculator.Instance;
            propertySetReinforcingBarCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePositiveLength("ISOCD3766ShapeParameter_a");
            ifcPSE.PropertyCalculator = ISOCD3766ShapeParameterACalculator.Instance;
            propertySetReinforcingBarCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePositiveLength("ISOCD3766ShapeParameter_b");
            ifcPSE.PropertyCalculator = ISOCD3766ShapeParameterBCalculator.Instance;
            propertySetReinforcingBarCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePositiveLength("ISOCD3766ShapeParameter_c");
            ifcPSE.PropertyCalculator = ISOCD3766ShapeParameterCCalculator.Instance;
            propertySetReinforcingBarCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePositiveLength("ISOCD3766ShapeParameter_d");
            ifcPSE.PropertyCalculator = ISOCD3766ShapeParameterDCalculator.Instance;
            propertySetReinforcingBarCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePositiveLength("ISOCD3766ShapeParameter_e");
            ifcPSE.PropertyCalculator = ISOCD3766ShapeParameterECalculator.Instance;
            propertySetReinforcingBarCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePositiveLength("ISOCD3766ShapeParameter_R");
            ifcPSE.PropertyCalculator = ISOCD3766BendingRadiusCalculator.Instance;
            propertySetReinforcingBarCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePlaneAngle("ISOCD3766BendingStartHook");
            ifcPSE.PropertyCalculator = ISOCD3766BendingStartHookCalculator.Instance;
            propertySetReinforcingBarCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePlaneAngle("ISOCD3766BendingEndHook");
            ifcPSE.PropertyCalculator = ISOCD3766BendingEndHookCalculator.Instance;
            propertySetReinforcingBarCommon.AddEntry(ifcPSE);
            
            commonPropertySets.Add(propertySetReinforcingBarCommon);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:50,代码来源:ExporterInitializer.cs

示例4: InitPropertySetFlowTerminalAirTerminal

        /// <summary>
        /// Initializes the Pset_FlowTerminalAirTerminal property set.
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetFlowTerminalAirTerminal(IList<PropertySetDescription> commonPropertySets)
        {
            //property beam common
            PropertySetDescription propertyFlowTerminalAirTerminal = new PropertySetDescription();
            propertyFlowTerminalAirTerminal.Name = "Pset_FlowTerminalAirTerminal";
            propertyFlowTerminalAirTerminal.SubElementIndex = (int)IFCCommonPSets.PSetFlowTerminalAirTerminal;

            propertyFlowTerminalAirTerminal.EntityTypes.Add(IFCEntityType.IfcFlowTerminal);

            propertyFlowTerminalAirTerminal.AddEntry(PropertySetEntry.CreateEnumeratedValue("AirflowType", PropertyType.Label,
                typeof(PSetFlowTerminalAirTerminal_AirTerminalAirflowType)));
            propertyFlowTerminalAirTerminal.AddEntry(PropertySetEntry.CreateEnumeratedValue("Location", PropertyType.Label,
                typeof(PSetFlowTerminalAirTerminal_AirTerminalLocation)));
            
            commonPropertySets.Add(propertyFlowTerminalAirTerminal);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:20,代码来源:ExporterInitializer.cs

示例5: InitPropertySetMemberCommon

        /// <summary>
        /// Initializes common IfcMember property sets.
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        /// <remarks>Reuses beam calculators for some values.</remarks>
        private static void InitPropertySetMemberCommon(IList<PropertySetDescription> commonPropertySets)
        {
            //property beam common
            PropertySetDescription propertySetMemberCommon = new PropertySetDescription();
            propertySetMemberCommon.Name = "Pset_MemberCommon";
            propertySetMemberCommon.SubElementIndex = (int)IFCCommonPSets.PSetMemberCommon;

            propertySetMemberCommon.EntityTypes.Add(IFCEntityType.IfcMember);

            PropertySetEntry ifcPSE = PropertySetEntryUtil.CreateReferenceEntry();
            propertySetMemberCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntryUtil.CreateLoadBearingEntry(BeamLoadBearingCalculator.Instance);
            propertySetMemberCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntryUtil.CreateIsExternalEntry();
            propertySetMemberCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntryUtil.CreateFireRatingEntry();
            propertySetMemberCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePositiveLength("Span");
            ifcPSE.RevitBuiltInParameter = BuiltInParameter.INSTANCE_LENGTH_PARAM;
            ifcPSE.PropertyCalculator = BeamSpanCalculator.Instance;
            propertySetMemberCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePlaneAngle("Slope");
            ifcPSE.PropertyCalculator = BeamSlopeCalculator.Instance;
            propertySetMemberCommon.AddEntry(ifcPSE);

            commonPropertySets.Add(propertySetMemberCommon);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:37,代码来源:ExporterInitializer.cs

示例6: InitPropertySetLightFixtureTypeCommon

        /// <summary>
        /// Initializes common LightFixtureType property sets.
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetLightFixtureTypeCommon(IList<PropertySetDescription> commonPropertySets)
        {
            //property beam common
            PropertySetDescription propertySetLightFixtureTypeCommon = new PropertySetDescription();
            propertySetLightFixtureTypeCommon.Name = "Pset_LightFixtureTypeCommon";
            propertySetLightFixtureTypeCommon.SubElementIndex = (int)IFCCommonPSets.PSetLightFixtureTypeCommon;

            propertySetLightFixtureTypeCommon.EntityTypes.Add(IFCEntityType.IfcLightFixtureType);

            PropertySetEntry ifcPSE = PropertySetEntry.CreateInteger("NumberOfSources");
            propertySetLightFixtureTypeCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePower("TotalWattage");
            ifcPSE.RevitBuiltInParameter = BuiltInParameter.LIGHTING_FIXTURE_WATTAGE;
            propertySetLightFixtureTypeCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateEnumeratedValue("LightFixtureMountingType", PropertyType.Label,
                typeof(PSetLightFixtureTypeCommon_LightFixtureMountingType));
            propertySetLightFixtureTypeCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateEnumeratedValue("LightFixturePlacingType", PropertyType.Label,
                typeof(PSetLightFixtureTypeCommon_LightFixturePlacingType));
            propertySetLightFixtureTypeCommon.AddEntry(ifcPSE);

            propertySetLightFixtureTypeCommon.AddEntry(PropertySetEntry.CreateReal("MaintenanceFactor"));
            propertySetLightFixtureTypeCommon.AddEntry(PropertySetEntry.CreateText("ManufacturersSpecificInformation"));

            // The value below is incorrect.  Although it is specified in IFC2x3, it is a duplicate of Pset_ManufacturerTypeInformation,
            // where it is correctly labelled as IfcIdentifier.
            //propertySetLightFixtureTypeCommon.AddEntry(PropertySetEntry.CreateClassificationReference("ArticleNumber"));

            commonPropertySets.Add(propertySetLightFixtureTypeCommon);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:37,代码来源:ExporterInitializer.cs

示例7: InitPropertySetElectricalCircuit

        /// <summary>
        /// Initializes the Pset_ElectricalCircuit property set.
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetElectricalCircuit(IList<PropertySetDescription> commonPropertySets)
        {
            //property beam common
            PropertySetDescription propertySetElectricalCircuit = new PropertySetDescription();
            propertySetElectricalCircuit.Name = "Pset_ElectricalCircuit";
            
            propertySetElectricalCircuit.EntityTypes.Add(IFCEntityType.IfcElectricalCircuit);

            propertySetElectricalCircuit.AddEntry(PropertySetEntry.CreatePositiveRatio("Diversity"));
            propertySetElectricalCircuit.AddEntry(PropertySetEntry.CreateInteger("NumberOfPhases"));
            //propertySetElectricalCircuit.AddEntry(PropertySetEntry.CreateElectricVoltage("MaximumAllowedVoltageDrop"));
            //propertySetElectricalCircuit.AddEntry(PropertySetEntry.CreateElectricResistance("NetImpedance"));

            commonPropertySets.Add(propertySetElectricalCircuit);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:19,代码来源:ExporterInitializer.cs

示例8: InitCOBIEPSetSpaceThermalSimulationProperties

        /// <summary>
        /// Initializes COBIE space thermal simulation property sets.
        /// </summary>
        /// <param name="cobiePropertySets">List to store property sets.</param>
        private static void InitCOBIEPSetSpaceThermalSimulationProperties(IList<PropertySetDescription> cobiePropertySets)
        {
            PropertySetDescription propertySetSpaceThermalSimulationProperties = new PropertySetDescription();
            propertySetSpaceThermalSimulationProperties.Name = "ePset_SpaceThermalSimulationProperties";
            propertySetSpaceThermalSimulationProperties.EntityTypes.Add(IFCEntityType.IfcSpace);

            PropertySetEntry ifcPSE = PropertySetEntry.CreateLabel("Space Thermal Simulation Type");
            ifcPSE.PropertyName = "SpaceThermalSimulationType";
            propertySetSpaceThermalSimulationProperties.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateLabel("Space Conditioning Requirement");
            ifcPSE.PropertyName = "SpaceConditioningRequirement";
            propertySetSpaceThermalSimulationProperties.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateReal("Space Occupant Density");
            ifcPSE.PropertyName = "SpaceOccupantDensity";
            propertySetSpaceThermalSimulationProperties.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateReal("Space Occupant Heat Rate");
            ifcPSE.PropertyName = "SpaceOccupantHeatRate";
            propertySetSpaceThermalSimulationProperties.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateReal("Space Occupant Load");
            ifcPSE.PropertyName = "SpaceOccupantLoad";
            propertySetSpaceThermalSimulationProperties.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateReal("Space Equipment Load");
            ifcPSE.PropertyName = "SpaceEquipmentLoad";
            propertySetSpaceThermalSimulationProperties.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateReal("Space Lighting Load");
            ifcPSE.PropertyName = "SpaceLightingLoad";
            propertySetSpaceThermalSimulationProperties.AddEntry(ifcPSE);

            cobiePropertySets.Add(propertySetSpaceThermalSimulationProperties);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:40,代码来源:ExporterInitializer.cs

示例9: InitPropertySetSpaceThermalDesign

        /// <summary>
        /// Initializes space thermal design property sets.
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetSpaceThermalDesign(IList<PropertySetDescription> commonPropertySets)
        {
            PropertySetDescription propertySetSpaceThermalDesign = new PropertySetDescription();
            propertySetSpaceThermalDesign.Name = "Pset_SpaceThermalDesign";
            propertySetSpaceThermalDesign.EntityTypes.Add(IFCEntityType.IfcSpace);

            PropertySetEntry ifcPSE = PropertySetEntry.CreateVolumetricFlowRate("CoolingDesignAirflow");
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateVolumetricFlowRate("HeatingDesignAirflow");
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePower("TotalSensibleHeatGain");
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePower("TotalHeatGain");
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePower("TotalHeatLoss");
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateThermodynamicTemperature("Inside Dry Bulb Temperature - Cooling");
            ifcPSE.PropertyName = "CoolingDryBulb";
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePositiveRatio("Inside Relative Humidity - Cooling");
            ifcPSE.PropertyName = "CoolingRelativeHumidity";
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateThermodynamicTemperature("Inside Dry Bulb Temperature - Heating");
            ifcPSE.PropertyName = "HeatingDryBulb";
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreatePositiveRatio("Inside Relative Humidity - Heating");
            ifcPSE.PropertyName = "HeatingRelativeHumidity";
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateVolumetricFlowRate("VentilationAirFlowrate");
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateVolumetricFlowRate("ExhaustAirFlowrate");
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntry.CreateBoolean("Inside Return Air Plenum");
            ifcPSE.PropertyName = "CeilingRAPlenum";
            propertySetSpaceThermalDesign.AddEntry(ifcPSE);

            // BoundaryAreaHeatLoss not yet supported.

            commonPropertySets.Add(propertySetSpaceThermalDesign);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:55,代码来源:ExporterInitializer.cs

示例10: InitCustomPropertySets


//.........这里部分代码省略.........
            ElementFilter viewScheduleElementFilter = new ElementClassFilter(typeof(ViewSchedule));
            viewScheduleElementCollector.WherePasses(viewScheduleElementFilter);

            int unnamedScheduleIndex = 1;
            foreach (ViewSchedule schedule in viewScheduleElementCollector)
            {
                //property set Manufacturer Information
                PropertySetDescription customPSet = new PropertySetDescription();

                string scheduleName = schedule.Name;
                if (string.IsNullOrWhiteSpace(scheduleName))
                {
                    scheduleName = "Unnamed Schedule " + unnamedScheduleIndex;
                    unnamedScheduleIndex++;
                }
                customPSet.Name = scheduleName;
                
                ScheduleDefinition definition = schedule.Definition;
                if (definition == null)
                    continue;

                // The schedule will be responsible for determining which elements to actually export.
                customPSet.ViewScheduleId = schedule.Id;
                customPSet.EntityTypes.Add(IFCEntityType.IfcElement);
                
                int fieldCount = definition.GetFieldCount();
                if (fieldCount == 0)
                    continue;

                HashSet<ElementId> containedElementIds = new HashSet<ElementId>();
                FilteredElementCollector elementsInViewScheduleCollector = new FilteredElementCollector(document, schedule.Id);
                foreach (Element containedElement in elementsInViewScheduleCollector)
                {
                    containedElementIds.Add(containedElement.Id);
                }
                ExporterCacheManager.ViewScheduleElementCache.Add(new KeyValuePair<ElementId, HashSet<ElementId>>(schedule.Id, containedElementIds));

                IDictionary<ElementId, Element> cachedElementTypes = new Dictionary<ElementId, Element>();

                for (int ii = 0; ii < fieldCount; ii++)
                {
                    ScheduleField field = definition.GetField(ii);

                    ScheduleFieldType fieldType = field.FieldType;
                    if (fieldType != ScheduleFieldType.Instance && fieldType != ScheduleFieldType.ElementType)
                        continue;

                    ElementId parameterId = field.ParameterId;
                    if (parameterId == ElementId.InvalidElementId)
                        continue;

                    // We use asBuiltInParameterId to get the parameter by id below.  We don't want to use it later, however, so
                    // we store builtInParameterId only if it is a proper member of the enumeration.
                    BuiltInParameter asBuiltInParameterId = (BuiltInParameter)parameterId.IntegerValue;
                    BuiltInParameter builtInParameterId =
                        Enum.IsDefined(typeof(BuiltInParameter), asBuiltInParameterId) ? asBuiltInParameterId : BuiltInParameter.INVALID;

                    Parameter containedElementParameter = null;
                   
                    // We could cache the actual elements when we store the element ids.  However, this would almost certainly take more
                    // time than getting one of the first few elements in the collector.
                    foreach (Element containedElement in elementsInViewScheduleCollector)
                    {
                        if (fieldType == ScheduleFieldType.Instance)
                            containedElementParameter = containedElement.get_Parameter(asBuiltInParameterId);

                        // shared parameters can return ScheduleFieldType.Instance, even if they are type parameters, so take a look.
                        if (containedElementParameter == null)
                        {
                            ElementId containedElementTypeId = containedElement.GetTypeId();
                            Element containedElementType = null;
                            if (containedElementTypeId != ElementId.InvalidElementId)
                            {
                                if (!cachedElementTypes.TryGetValue(containedElementTypeId, out containedElementType))
                                {
                                    containedElementType = document.GetElement(containedElementTypeId);
                                    cachedElementTypes[containedElementTypeId] = containedElementType;
                                }
                            }
                            if (containedElementType != null)
                                containedElementParameter = containedElementType.get_Parameter(asBuiltInParameterId);
                        }

                        if (containedElementParameter != null)
                            break;
                    }
                    if (containedElementParameter == null)
                        continue;

                    PropertySetEntry ifcPSE = PropertySetEntry.CreateParameterEntry(containedElementParameter);
                    ifcPSE.RevitBuiltInParameter = builtInParameterId;
                    ifcPSE.PropertyName = field.ColumnHeading;
                    customPSet.AddEntry(ifcPSE);
                }

                customPropertySets.Add(customPSet);
            }

            propertySets.Add(customPropertySets);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:101,代码来源:ExporterInitializer.cs

示例11: InitPropertySetSwitchingDeviceTypeToggleSwitch

        /// <summary>
        /// Initializes Pset_SwitchingDeviceTypeToggleSwitch
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetSwitchingDeviceTypeToggleSwitch(IList<PropertySetDescription> commonPropertySets)
        {
            PropertySetDescription propertySetSwitchingDeviceTypeToggleSwitch = new PropertySetDescription();
            propertySetSwitchingDeviceTypeToggleSwitch.Name = "Pset_SwitchingDeviceTypeToggleSwitch";
            propertySetSwitchingDeviceTypeToggleSwitch.EntityTypes.Add(IFCEntityType.IfcSwitchingDeviceType);
            // TODO: Restrict to TOGGLESWITCH.

            propertySetSwitchingDeviceTypeToggleSwitch.AddEntry(PropertySetEntry.CreateEnumeratedValue("ToggleSwitchType",
                PropertyType.Label, typeof(PsetSwitchingDeviceTypeToggleSwitch_ToggleSwitchType)));
            propertySetSwitchingDeviceTypeToggleSwitch.AddEntry(PropertySetEntry.CreateEnumeratedValue("SwitchUsage",
                PropertyType.Label, typeof(PsetSwitchingDeviceTypeToggleSwitch_SwitchUsage)));
            propertySetSwitchingDeviceTypeToggleSwitch.AddEntry(PropertySetEntry.CreateEnumeratedValue("SwitchActivation",
                PropertyType.Label, typeof(PsetSwitchingDeviceTypeToggleSwitch_SwitchActivation)));
                propertySetSwitchingDeviceTypeToggleSwitch.AddEntry(PropertySetEntry.CreateBoolean("IsIlluminated"));
                propertySetSwitchingDeviceTypeToggleSwitch.AddEntry(PropertySetEntry.CreateLabel("Legend"));

            commonPropertySets.Add(propertySetSwitchingDeviceTypeToggleSwitch);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:22,代码来源:ExporterInitializer.cs

示例12: InitPropertySetSwitchingDeviceTypeCommon

        /// <summary>
        /// Initializes Pset_SwitchingDeviceTypeCommon
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetSwitchingDeviceTypeCommon(IList<PropertySetDescription> commonPropertySets)
        {
            PropertySetDescription propertySetSwitchingDeviceTypeCommon = new PropertySetDescription();
            propertySetSwitchingDeviceTypeCommon.Name = "Pset_SwitchingDeviceTypeCommon";
            propertySetSwitchingDeviceTypeCommon.EntityTypes.Add(IFCEntityType.IfcSwitchingDeviceType);

            propertySetSwitchingDeviceTypeCommon.AddEntry(PropertySetEntry.CreateInteger("NumberOfGangs"));
            propertySetSwitchingDeviceTypeCommon.AddEntry(PropertySetEntry.CreateEnumeratedValue("SwitchFunction",
                PropertyType.Label, typeof(PsetSwitchingDeviceTypeCommon_SwitchFunction)));
            propertySetSwitchingDeviceTypeCommon.AddEntry(PropertySetEntry.CreateBoolean("HasLock"));

            commonPropertySets.Add(propertySetSwitchingDeviceTypeCommon);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:17,代码来源:ExporterInitializer.cs

示例13: InitPropertySetSanitaryTerminalTypeWashHandBasin

        /// <summary>
        /// Initializes Pset_SanitaryTerminalTypeWashHandBasin
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetSanitaryTerminalTypeWashHandBasin(IList<PropertySetDescription> commonPropertySets)
        {
            PropertySetDescription propertySetWashHandBasin = new PropertySetDescription();
            propertySetWashHandBasin.Name = "Pset_SanitaryTerminalTypeWashHandBasin";
            propertySetWashHandBasin.EntityTypes.Add(IFCEntityType.IfcSanitaryTerminalType);
            propertySetWashHandBasin.PredefinedType = "WASHHANDBASIN";

            propertySetWashHandBasin.AddEntry(PropertySetEntry.CreateEnumeratedValue("WashHandBasinType", PropertyType.Label,
                typeof(PsetSanitaryTerminalTypeWashHandBasin_WashHandBasinType)));
            // PsetSanitaryTerminalTypeToiletPan_SanitaryMounting is purposely reused, as it is identical.
            propertySetWashHandBasin.AddEntry(PropertySetEntry.CreateEnumeratedValue("WashHandBasinMounting", PropertyType.Label,
                typeof(PsetSanitaryTerminalTypeToiletPan_SanitaryMounting)));
            //propertySetWashHandBasin.AddEntry(PropertySetEntry.CreateMaterial("Material"));
            propertySetWashHandBasin.AddEntry(PropertySetEntry.CreatePositiveLength("NominalLength"));
            propertySetWashHandBasin.AddEntry(PropertySetEntry.CreatePositiveLength("NominalWidth"));
            propertySetWashHandBasin.AddEntry(PropertySetEntry.CreatePositiveLength("NominalDepth"));
            propertySetWashHandBasin.AddEntry(PropertySetEntry.CreateText("Color"));
            propertySetWashHandBasin.AddEntry(PropertySetEntry.CreatePositiveLength("DrainSize"));

            commonPropertySets.Add(propertySetWashHandBasin);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:25,代码来源:ExporterInitializer.cs

示例14: InitPropertySetSanitaryTerminalTypeToiletPan

        /// <summary>
        /// Initializes Pset_SanitaryTerminalTypeToiletPan
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetSanitaryTerminalTypeToiletPan(IList<PropertySetDescription> commonPropertySets)
        {
            PropertySetDescription propertySetToiletPan = new PropertySetDescription();
            propertySetToiletPan.Name = "Pset_SanitaryTerminalTypeToiletPan";
            propertySetToiletPan.EntityTypes.Add(IFCEntityType.IfcSanitaryTerminalType);
            propertySetToiletPan.PredefinedType = "TOILETPAN";

            propertySetToiletPan.AddEntry(PropertySetEntry.CreateEnumeratedValue("ToiletType", PropertyType.Label,
                typeof(PsetSanitaryTerminalTypeToiletPan_ToiletType)));
            propertySetToiletPan.AddEntry(PropertySetEntry.CreateEnumeratedValue("ToiletPanType", PropertyType.Label,
                typeof(PsetSanitaryTerminalTypeToiletPan_ToiletPanType)));
            propertySetToiletPan.AddEntry(PropertySetEntry.CreateEnumeratedValue("PanMounting", PropertyType.Label,
                typeof(PsetSanitaryTerminalTypeToiletPan_SanitaryMounting)));
            //propertySetToiletPan.AddEntry(PropertySetEntry.CreateMaterial("PanMaterial"));
                propertySetToiletPan.AddEntry(PropertySetEntry.CreateText("PanColor"));
            propertySetToiletPan.AddEntry(PropertySetEntry.CreatePositiveLength("SpilloverLevel"));
            propertySetToiletPan.AddEntry(PropertySetEntry.CreatePositiveLength("NominalLength"));
            propertySetToiletPan.AddEntry(PropertySetEntry.CreatePositiveLength("NominalWidth"));
            propertySetToiletPan.AddEntry(PropertySetEntry.CreatePositiveLength("NominalDepth"));

            commonPropertySets.Add(propertySetToiletPan);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:26,代码来源:ExporterInitializer.cs

示例15: InitPropertySetCoveringCommon

        /// <summary>
        /// Initializes common covering property sets.
        /// </summary>
        /// <param name="commonPropertySets">List to store property sets.</param>
        private static void InitPropertySetCoveringCommon(IList<PropertySetDescription> commonPropertySets, IFCVersion fileVersion)
        {
            //property set covering common
            PropertySetDescription propertySetCoveringCommon = new PropertySetDescription();
            propertySetCoveringCommon.Name = "Pset_CoveringCommon";
            propertySetCoveringCommon.SubElementIndex = (int)IFCCommonPSets.PSetCoveringCommon;

            propertySetCoveringCommon.EntityTypes.Add(IFCEntityType.IfcCovering);

            PropertySetEntry ifcPSE = PropertySetEntryUtil.CreateReferenceEntry();
            propertySetCoveringCommon.AddEntry(ifcPSE);

            ifcPSE = PropertySetEntryUtil.CreateFireRatingEntry();
            propertySetCoveringCommon.AddEntry(ifcPSE);

            propertySetCoveringCommon.AddEntry(PropertySetEntryUtil.CreateAcousticRatingEntry());
            propertySetCoveringCommon.AddEntry(PropertySetEntry.CreateLabel("FlammabilityRating"));
            propertySetCoveringCommon.AddEntry(PropertySetEntryUtil.CreateSurfaceSpreadOfFlameEntry());
            propertySetCoveringCommon.AddEntry(PropertySetEntryUtil.CreateCombustibleEntry());


            if (fileVersion == IFCVersion.IFC2x2)
                propertySetCoveringCommon.AddEntry(PropertySetEntry.CreateLabel("Fragility"));
            else
                propertySetCoveringCommon.AddEntry(PropertySetEntry.CreateLabel("FragilityRating"));

            ifcPSE = PropertySetEntry.CreateText("Finish");
            ifcPSE.PropertyCalculator = CoveringFinishCalculator.Instance;
            propertySetCoveringCommon.AddEntry(ifcPSE);

                ifcPSE = PropertySetEntry.CreatePositiveLength("TotalThickness");
                ifcPSE.RevitBuiltInParameter = BuiltInParameter.CEILING_THICKNESS;
                propertySetCoveringCommon.AddEntry(ifcPSE);

            commonPropertySets.Add(propertySetCoveringCommon);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:40,代码来源:ExporterInitializer.cs


注:本文中的BIM.IFC.Exporter.PropertySet.PropertySetDescription.AddEntry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。