public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: base.IfcParse(propIndex, value); break; case 3: _timeValue = value.RealVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public void IfcTimeMeasureToIfcDurationTest() { const double numSeconds = 3000501.32; var timeMeasure = new Xbim.Ifc2x3.MeasureResource.IfcTimeMeasure(numSeconds); var isoDuration = timeMeasure.ToISODateTimeString(); Assert.IsTrue(isoDuration == "P34DT17H28M21.320S"); //convert back var ifc4Duration = new Xbim.Ifc4.DateTimeResource.IfcDuration(isoDuration); var timeSpan = ifc4Duration.ToTimeSpan(); Assert.IsTrue(timeSpan.TotalSeconds == numSeconds); timeMeasure = new Xbim.Ifc2x3.MeasureResource.IfcTimeMeasure(Math.Truncate(numSeconds)); isoDuration = timeMeasure.ToISODateTimeString(); Assert.IsTrue(isoDuration == "P34DT17H28M21S"); }
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: _ServiceLifeType = (IfcServiceLifeTypeEnum)Enum.Parse(typeof(IfcServiceLifeTypeEnum), value.EnumVal); break; case 6: _ServiceLifeDuration = value.RealVal; 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: case 6: case 7: base.IfcParse(propIndex, value); break; case 8: _timeStep = value.RealVal; break; case 9: _values.Add((IfcTimeSeriesValue) 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: base.IfcParse(propIndex, value); break; case 4: _relatingProcess = (IfcProcess) value.EntityVal; break; case 5: _relatedProcess = (IfcProcess) value.EntityVal; break; case 6: _timeLag = value.RealVal; break; case 7: _sequenceType = (IfcSequenceEnum)Enum.Parse(typeof(IfcSequenceEnum), value.EnumVal, true); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }