Example #1
0
        public virtual void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
                case 0:
                    _name = value.StringVal;
                    break;
                case 1:
                    _description = value.StringVal;
                    break;
                case 2:
                    _appliedValue = (IfcAppliedValueSelect) value.EntityVal;
                    break;
                case 3:
                    _unitBasis = (IfcMeasureWithUnit) value.EntityVal;
                    break;
                case 4:
                    _applicableDate = (IfcDateTimeSelect) value.EntityVal;
                    break;
                case 5:
                    _fixedUntilDate = (IfcDateTimeSelect) value.EntityVal;
                    break;

                default:
                    this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
         case 1:
             base.IfcParse(propIndex, value);
             break;
         case 2:
             _name = value.StringVal;
             break;
         case 3:
             _conversionFactor = (IfcMeasureWithUnit) value.EntityVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
 private static string GetMeasureWithUnitAsString(IfcMeasureWithUnit ifcMeasureWithUnit)
 {
     string value = string.Format("{0,0:N2}", ifcMeasureWithUnit.ValueComponent.Value);
     IfcUnit ifcUnit = ifcMeasureWithUnit.UnitComponent;
     string unit = ifcUnit.GetSymbol();
     if (!string.IsNullOrEmpty(unit))
     {
         value += unit;
     }
     
     return value;
 }
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
         case 1:
         case 2:
         case 3:
         case 4:
             base.IfcParse(propIndex, value);
             break;
         case 5:
             _resourceIdentifier = value.StringVal;
             break;
         case 6:
             _resourceGroup = value.StringVal;
             break;
         case 7:
             _resourceConsumption =
                 (IfcResourceConsumptionEnum) Enum.Parse(typeof (IfcResourceConsumptionEnum), value.EnumVal);
             break;
         case 8:
             _baseQuantity = (IfcMeasureWithUnit) value.EntityVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
 public override void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
         case 1:
         case 2:
         case 3:
         case 4:
         case 5:
             base.IfcParse(propIndex, value);
             break;
         case 6:
             _relatingProcess = (IfcProcess) value.EntityVal;
             break;
         case 7:
             _quantityInProcess = (IfcMeasureWithUnit) value.EntityVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }