• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# PropertyValueType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PropertyValueType的典型用法代码示例。如果您正苦于以下问题:C# PropertyValueType类的具体用法?C# PropertyValueType怎么用?C# PropertyValueType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PropertyValueType类属于命名空间,在下文中一共展示了PropertyValueType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateElectricalCurrentMeasurePropertyFromCache

        /// <summary>
        /// Create a label property, or retrieve from cache.
        /// </summary>
        /// <param name="file">The IFC file.</param>
        /// <param name="propertyName">The name of the property.</param>
        /// <param name="value">The value of the property.</param>
        /// <param name="valueType">The value type of the property.</param>
        /// <returns>The created or cached property handle.</returns>
        public static IFCAnyHandle CreateElectricalCurrentMeasurePropertyFromCache(IFCFile file, string propertyName, double value, PropertyValueType valueType)
        {
            // We have a partial cache here - we will only cache multiples of 15 degrees.
            bool canCache = false;
            double ampsDiv5 = Math.Floor(value / 5.0 + 0.5);
            double integerAmps = ampsDiv5 * 5.0;
            if (MathUtil.IsAlmostEqual(value, integerAmps))
            {
                canCache = true;
                value = integerAmps;
            }

            IFCAnyHandle propertyHandle;
            if (canCache)
            {
                propertyHandle = ExporterCacheManager.PropertyInfoCache.ElectricalCurrentCache.Find(propertyName, value);
                if (propertyHandle != null)
                    return propertyHandle;
            }

            propertyHandle = CreateElectricalCurrentMeasureProperty(file, propertyName, value, valueType);

            if (canCache && !IFCAnyHandleUtil.IsNullOrHasNoValue(propertyHandle))
            {
                ExporterCacheManager.PropertyInfoCache.ElectricalCurrentCache.Add(propertyName, value, propertyHandle);
            }

            return propertyHandle;
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:37,代码来源:ElectricalCurrentPropertyUtil.cs


示例2: CreateFrequencyPropertyFromElement

 /// <summary>
 /// Create a Frequency measure property from the element's parameter.
 /// </summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="exporterIFC">The ExporterIFC.</param>
 /// <param name="elem">The Element.</param>
 /// <param name="revitParameterName">The name of the parameter.</param>
 /// <param name="ifcPropertyName">The name of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreateFrequencyPropertyFromElement(IFCFile file, ExporterIFC exporterIFC, Element elem,
     string revitParameterName, string ifcPropertyName, PropertyValueType valueType)
 {
     double propertyValue;
     if (ParameterUtil.GetDoubleValueFromElement(elem, null, revitParameterName, out propertyValue) != null)
         return CreateFrequencyProperty(file, ifcPropertyName, propertyValue, valueType);
     return null;
 }
开发者ID:whztt07,项目名称:RevitIFC,代码行数:18,代码来源:FrequencyPropertyUtil.cs


示例3: CreateElectricalCurrentMeasureProperty

 /// <summary>
 /// Create a label property.
 /// </summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="value">The value of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreateElectricalCurrentMeasureProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
 {
     switch (valueType)
     {
         case PropertyValueType.EnumeratedValue:
             {
                 IList<IFCData> valueList = new List<IFCData>();
                 valueList.Add(IFCDataUtil.CreateAsElectricalCurrentMeasure(value));
                 return IFCInstanceExporter.CreatePropertyEnumeratedValue(file, propertyName, null, valueList, null);
             }
         case PropertyValueType.SingleValue:
             return IFCInstanceExporter.CreatePropertySingleValue(file, propertyName, null, IFCDataUtil.CreateAsElectricalCurrentMeasure(value), null);
         default:
             throw new InvalidOperationException("Missing case!");
     }
 }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:24,代码来源:ElectricalCurrentPropertyUtil.cs


示例4: CreatePositivePlaneAngleMeasureProperty

        /// <summary>
        /// Create a label property.
        /// </summary>
        /// <param name="file">The IFC file.</param>
        /// <param name="propertyName">The name of the property.</param>
        /// <param name="value">The value of the property.</param>
        /// <param name="valueType">The value type of the property.</param>
        /// <returns>The created property handle.</returns>
        public static IFCAnyHandle CreatePositivePlaneAngleMeasureProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
        {
            // Ensure it is positive.  Don't throw, but should tell user.
            if (value <= MathUtil.Eps())
                return null;

            switch (valueType)
            {
                case PropertyValueType.EnumeratedValue:
                    {
                        IList<IFCData> valueList = new List<IFCData>();
                        valueList.Add(IFCDataUtil.CreateAsPositivePlaneAngleMeasure(value));
                        return IFCInstanceExporter.CreatePropertyEnumeratedValue(file, propertyName, null, valueList, null);
                    }
                case PropertyValueType.SingleValue:
                    return IFCInstanceExporter.CreatePropertySingleValue(file, propertyName, null, IFCDataUtil.CreateAsPositivePlaneAngleMeasure(value), null);
                default:
                    throw new InvalidOperationException("Missing case!");
            }
        }
开发者ID:whztt07,项目名称:RevitIFC,代码行数:28,代码来源:PositivePlaneAnglePropertyUtil.cs


示例5: CreateCommonProperty

 protected static IFCAnyHandle CreateCommonProperty(IFCFile file, string propertyName, IFCData valueData, PropertyValueType valueType, string unitTypeKey)
 {
     switch (valueType)
     {
         case PropertyValueType.EnumeratedValue:
             {
                 IList<IFCData> valueList = new List<IFCData>();
                 valueList.Add(valueData);
                 return IFCInstanceExporter.CreatePropertyEnumeratedValue(file, propertyName, null, valueList, null);
             }
         case PropertyValueType.SingleValue:
             {
                 if (unitTypeKey != null)
                     return IFCInstanceExporter.CreatePropertySingleValue(file, propertyName, null, valueData, ExporterCacheManager.UnitsCache[unitTypeKey]);
                 else
                     return IFCInstanceExporter.CreatePropertySingleValue(file, propertyName, null, valueData, null);
             }
         default:
             throw new InvalidOperationException("Missing case!");
     }
 }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:21,代码来源:PropertyUtil.cs


示例6: CreateFrequencyPropertyFromElementOrSymbol

        /// <summary>
        /// Create a Frequency measure property from the element's or type's parameter.
        /// </summary>
        /// <param name="file">The IFC file.</param>
        /// <param name="exporterIFC">The ExporterIFC.</param>
        /// <param name="elem">The Element.</param>
        /// <param name="revitParameterName">The name of the parameter.</param>
        /// <param name="revitBuiltInParam">The built in parameter to use, if revitParameterName isn't found.</param>
        /// <param name="ifcPropertyName">The name of the property.</param>
        /// <param name="valueType">The value type of the property.</param>
        /// <returns>The created property handle.</returns>
        public static IFCAnyHandle CreateFrequencyPropertyFromElementOrSymbol(IFCFile file, ExporterIFC exporterIFC, Element elem,
            string revitParameterName, BuiltInParameter revitBuiltInParam, string ifcPropertyName, PropertyValueType valueType)
        {
            IFCAnyHandle propHnd = CreateFrequencyPropertyFromElement(file, exporterIFC, elem, revitParameterName, ifcPropertyName, valueType);
            if (!IFCAnyHandleUtil.IsNullOrHasNoValue(propHnd))
                return propHnd;

            if (revitBuiltInParam != BuiltInParameter.INVALID)
            {
                string builtInParamName = LabelUtils.GetLabelFor(revitBuiltInParam);
                propHnd = CreateFrequencyPropertyFromElement(file, exporterIFC, elem, builtInParamName, ifcPropertyName, valueType);
                if (!IFCAnyHandleUtil.IsNullOrHasNoValue(propHnd))
                    return propHnd;
            }

            // For Symbol
            Document document = elem.Document;
            ElementId typeId = elem.GetTypeId();
            Element elemType = document.GetElement(typeId);
            if (elemType != null)
                return CreateFrequencyPropertyFromElementOrSymbol(file, exporterIFC, elemType, revitParameterName, revitBuiltInParam, ifcPropertyName, valueType);
            else
                return null;
        }
开发者ID:whztt07,项目名称:RevitIFC,代码行数:35,代码来源:FrequencyPropertyUtil.cs


示例7: CreateFrequencyProperty

 /// <summary>Create a FrequencyMeasure property.</summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="value">The value of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreateFrequencyProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
 {
     IFCData frequencyData = IFCDataUtil.CreateAsFrequencyMeasure(value);
     return CreateCommonProperty(file, propertyName, frequencyData, valueType, null);
 }
开发者ID:whztt07,项目名称:RevitIFC,代码行数:11,代码来源:FrequencyPropertyUtil.cs


示例8: AddProperty

 /// <summary>
 /// Add property value to product
 /// </summary>
 private void AddProperty(CatalogProduct product, string propertyName, object value, PropertyValueType propertyValueType)
 {
     var property = _catalogProperties.FirstOrDefault(x => x.Name == propertyName);
     if (property != null)
     {
         var propertyValue = new PropertyValue
         {
             PropertyId = property.Id,
             PropertyName = property.Name,
             Value = value,
             ValueType = propertyValueType
         };
         if (product.PropertyValues == null)
         {
             product.PropertyValues = new List<PropertyValue>();
         }
         product.PropertyValues.Add(propertyValue);
     }
 }
开发者ID:VirtoCommerce,项目名称:vc-internal,代码行数:22,代码来源:ModuleImporter.cs


示例9: CreateElectricalVoltageMeasureProperty

 /// <summary>
 /// Create a label property.
 /// </summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="value">The value of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreateElectricalVoltageMeasureProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
 {
     IFCData electricalVoltageData = IFCDataUtil.CreateAsElectricalVoltageMeasure(value);
     return CreateCommonProperty(file, propertyName, electricalVoltageData, valueType, null);
 }
开发者ID:whztt07,项目名称:RevitIFC,代码行数:13,代码来源:ElectricalVoltagePropertyUtil.cs


示例10: CreatePropertyFromElementOrSymbolBase

        // This function is static to make sure that no properties are used directly from the entry.
        private static IFCAnyHandle CreatePropertyFromElementOrSymbolBase(IFCFile file, ExporterIFC exporterIFC, Element element,
            string revitParamNameToUse, string ifcPropertyName, BuiltInParameter builtInParameter,
            PropertyType propertyType, PropertyValueType valueType, Type propertyEnumerationType)
        {
            IFCAnyHandle propHnd = null;

            switch (propertyType)
            {
                case PropertyType.Text:
                    {
                        propHnd = PropertyUtil.CreateTextPropertyFromElementOrSymbol(file, element, revitParamNameToUse, builtInParameter, ifcPropertyName, valueType, propertyEnumerationType);
                        break;
                    }
                case PropertyType.Label:
                    {
                        propHnd = PropertyUtil.CreateLabelPropertyFromElementOrSymbol(file, element, revitParamNameToUse, builtInParameter, ifcPropertyName, valueType, propertyEnumerationType);
                        break;
                    }
                case PropertyType.Identifier:
                    {
                        propHnd = PropertyUtil.CreateIdentifierPropertyFromElementOrSymbol(file, element, revitParamNameToUse, builtInParameter, ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.Boolean:
                    {
                        propHnd = PropertyUtil.CreateBooleanPropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.Logical:
                    {
                        propHnd = PropertyUtil.CreateLogicalPropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.Integer:
                    {
                        propHnd = PropertyUtil.CreateIntegerPropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.Real:
                    {
                        propHnd = PropertyUtil.CreateRealPropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.Length:
                    {
                        propHnd = PropertyUtil.CreateLengthMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                            builtInParameter, ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.PositiveLength:
                    {
                        propHnd = PropertyUtil.CreatePositiveLengthMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                            builtInParameter, ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.NormalisedRatio:
                    {
                        propHnd = PropertyUtil.CreateNormalisedRatioPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                            ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.PositiveRatio:
                    {
                        propHnd = PropertyUtil.CreatePositiveRatioPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, 
                            ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.Ratio:
                    {
                        propHnd = PropertyUtil.CreateRatioPropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse, ifcPropertyName, 
                            valueType);
                        break;
                    }
                case PropertyType.PlaneAngle:
                    {
                        propHnd = PropertyUtil.CreatePlaneAngleMeasurePropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName, 
                            valueType);
                        break;
                    }
                case PropertyType.PositivePlaneAngle:
                    {
                        propHnd = PositivePlaneAnglePropertyUtil.CreatePositivePlaneAngleMeasurePropertyFromElementOrSymbol(file, element, revitParamNameToUse, ifcPropertyName,
                            valueType);
                        break;
                    }
                case PropertyType.Area:
                    {
                        propHnd = PropertyUtil.CreateAreaMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                            builtInParameter, ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.Volume:
                    {
                        propHnd = PropertyUtil.CreateVolumeMeasurePropertyFromElementOrSymbol(file, exporterIFC, element, revitParamNameToUse,
                            builtInParameter, ifcPropertyName, valueType);
                        break;
                    }
                case PropertyType.Count:
                    {
//.........这里部分代码省略.........
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:101,代码来源:PropertySetEntry.cs


示例11: CreateRealPropertyFromCache

        /// <summary>Create a real property, using a cached value if possible.</summary>
        /// <param name="file">The IFC file.</param>
        /// <param name="propertyName">The name of the property.</param>
        /// <param name="value">The value of the property.</param>
        /// <param name="valueType">The value type of the property.</param>
        /// <returns>The created or cached property handle.</returns>
        public static IFCAnyHandle CreateRealPropertyFromCache(IFCFile file, double scale, string propertyName, double value, PropertyValueType valueType)
        {
            double? adjustedValue = CanCacheDouble(scale, value);
            bool canCache = adjustedValue.HasValue;
            if (canCache)
            {
                value = adjustedValue.GetValueOrDefault();
            }

            IFCAnyHandle propertyHandle;
            if (canCache)
            {
                propertyHandle = ExporterCacheManager.PropertyInfoCache.RealCache.Find(propertyName, value);
                if (propertyHandle != null)
                    return propertyHandle;
            }

            propertyHandle = CreateRealProperty(file, propertyName, value, valueType);

            if (canCache && !IFCAnyHandleUtil.IsNullOrHasNoValue(propertyHandle))
            {
                ExporterCacheManager.PropertyInfoCache.RealCache.Add(propertyName, value, propertyHandle);
            }

            return propertyHandle;
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:32,代码来源:PropertyUtil.cs


示例12: CreatePositiveLengthMeasureProperty

 /// <summary>
 /// Create a positive length measure property.
 /// </summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="value">The value of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreatePositiveLengthMeasureProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
 {
     if (value > MathUtil.Eps())
     {
         IFCData posLengthData = IFCDataUtil.CreateAsPositiveLengthMeasure(value);
         return CreateCommonProperty(file, propertyName, posLengthData, valueType, null);
     }
     return null;
 }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:17,代码来源:PropertyUtil.cs


示例13: CreateElectricalCurrentMeasurePropertyFromElementOrSymbol

 /// <summary>
 /// Create an electrical current measure property from the element's or type's parameter.
 /// </summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="elem">The Element.</param>
 /// <param name="revitParameterName">The name of the parameter.</param>
 /// <param name="ifcPropertyName">The name of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreateElectricalCurrentMeasurePropertyFromElementOrSymbol(IFCFile file, Element elem, string revitParameterName, string ifcPropertyName, PropertyValueType valueType)
 {
     double propertyValue;
     if (ParameterUtil.GetDoubleValueFromElement(elem, null, revitParameterName, out propertyValue) != null)
     {
         return CreateElectricalCurrentMeasurePropertyFromCache(file, ifcPropertyName, propertyValue, valueType);
     }
     // For Symbol
     Document document = elem.Document;
     ElementId typeId = elem.GetTypeId();
     Element elemType = document.GetElement(typeId);
     if (elemType != null)
         return CreateElectricalCurrentMeasurePropertyFromElementOrSymbol(file, elemType, revitParameterName, ifcPropertyName, valueType);
     else
         return null;
 }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:25,代码来源:ElectricalCurrentPropertyUtil.cs


示例14: CreateThermalTransmittancePropertyFromCache

        /// <summary>Create a Thermal Transmittance property, using a cached value if possible.</summary>
        /// <param name="file">The IFC file.</param>
        /// <param name="propertyName">The name of the property.</param>
        /// <param name="value">The value of the property.</param>
        /// <param name="valueType">The value type of the property.</param>
        /// <returns>The created or cached property handle.</returns>
        public static IFCAnyHandle CreateThermalTransmittancePropertyFromCache(IFCFile file, string propertyName, double value, PropertyValueType valueType)
        {
            double? adjustedValue = CanCacheThermalTransmittance(value);
            bool canCache = adjustedValue.HasValue;
            if (canCache)
                value = adjustedValue.GetValueOrDefault();

            IFCAnyHandle propertyHandle;
            if (canCache)
            {
                propertyHandle = ExporterCacheManager.PropertyInfoCache.ThermalTransmittanceCache.Find(propertyName, value);
                if (propertyHandle != null)
                    return propertyHandle;
            }

            propertyHandle = CreateThermalTransmittanceProperty(file, propertyName, value, valueType);

            if (canCache && !IFCAnyHandleUtil.IsNullOrHasNoValue(propertyHandle))
                ExporterCacheManager.PropertyInfoCache.ThermalTransmittanceCache.Add(propertyName, value, propertyHandle);

            return propertyHandle;
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:28,代码来源:PropertyUtil.cs


示例15: CreateThermalTransmittanceProperty

 /// <summary>Create a ThermalTransmittance property.</summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="value">The value of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreateThermalTransmittanceProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
 {
     IFCData thermalTransmittanceData = IFCDataUtil.CreateAsThermalTransmittanceMeasure(value);
     return CreateCommonProperty(file, propertyName, thermalTransmittanceData, valueType, null);
             }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:11,代码来源:PropertyUtil.cs


示例16: CreatePowerProperty

 /// <summary>Create a PowerMeasure property.</summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="value">The value of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreatePowerProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
 {
     IFCData powerData = IFCDataUtil.CreateAsPowerMeasure(value);
     return CreateCommonProperty(file, propertyName, powerData, valueType, null);
 }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:11,代码来源:PropertyUtil.cs


示例17: CreateLuminousIntensityProperty

 /// <summary>Create a LuminousIntensityMeasure property.</summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="value">The value of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreateLuminousIntensityProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
             {
     IFCData luminousIntensityData = IFCDataUtil.CreateAsLuminousIntensityMeasure(value);
     return CreateCommonProperty(file, propertyName, luminousIntensityData, valueType, null);
             }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:11,代码来源:PropertyUtil.cs


示例18: CreateIlluminanceProperty

 /// <summary>Create an IlluminanceMeasure property.</summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="value">The value of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreateIlluminanceProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
 {
     IFCData illuminanceData = IFCDataUtil.CreateAsIlluminanceMeasure(value);
     return CreateCommonProperty(file, propertyName, illuminanceData, valueType, null);
 }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:11,代码来源:PropertyUtil.cs


示例19: CreatePositiveRatioMeasureProperty

 /// <summary>
 /// Create a positive ratio measure property.
 /// </summary>
 /// <param name="file">The IFC file.</param>
 /// <param name="propertyName">The name of the property.</param>
 /// <param name="value">The value of the property.</param>
 /// <param name="valueType">The value type of the property.</param>
 /// <returns>The created property handle.</returns>
 public static IFCAnyHandle CreatePositiveRatioMeasureProperty(IFCFile file, string propertyName, double value, PropertyValueType valueType)
 {
     return CreateRatioMeasurePropertyCommon(file, propertyName, value, valueType, true);
 }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:12,代码来源:PropertyUtil.cs


示例20: CreateRatioMeasurePropertyCommon

        private static IFCAnyHandle CreateRatioMeasurePropertyCommon(IFCFile file, string propertyName, double value, PropertyValueType valueType,
            bool positiveOnly)
        {
            if (positiveOnly && (value <= MathUtil.Eps()))
                return null;

            IFCData ratioData = positiveOnly ? IFCDataUtil.CreateAsPositiveRatioMeasure(value) : IFCDataUtil.CreateAsRatioMeasure(value);
            return CreateCommonProperty(file, propertyName, ratioData, valueType, null);  
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:9,代码来源:PropertyUtil.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Props类代码示例发布时间:2022-05-24
下一篇:
C# PropertyValue类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap