Exemple #1
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _name = value.StringVal;
                return;

            case 1:
                _description = value.StringVal;
                return;

            case 2:
                _appliedValue = (IfcAppliedValueSelect)(value.EntityVal);
                return;

            case 3:
                _unitBasis = (IfcMeasureWithUnit)(value.EntityVal);
                return;

            case 4:
                _applicableDate = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 5:
                _fixedUntilDate = (IfcDateTimeSelect)(value.EntityVal);
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
Exemple #2
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;
            }
        }
Exemple #3
0
 public IfcAppliedValue(IfcLabel?__Name, IfcText?__Description, IfcAppliedValueSelect __AppliedValue, IfcMeasureWithUnit __UnitBasis, IfcDateTimeSelect __ApplicableDate, IfcDateTimeSelect __FixedUntilDate)
 {
     this._Name           = __Name;
     this._Description    = __Description;
     this._AppliedValue   = __AppliedValue;
     this._UnitBasis      = __UnitBasis;
     this._ApplicableDate = __ApplicableDate;
     this._FixedUntilDate = __FixedUntilDate;
 }
        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:
                _identifier = (IfcIdentifier)value.StringVal;
                break;

            case 6:
                _creationDate = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 7:
                _creators.Add((IfcPerson)value.EntityVal);
                break;

            case 8:
                _purpose = value.StringVal;
                break;

            case 9:
                _duration = value.RealVal;
                break;

            case 10:
                _totalFloat = value.RealVal;
                break;

            case 11:
                _startTime = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 12:
                _finishTime = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 13:
                _workControlType = (IfcWorkControlTypeEnum)Enum.Parse(typeof(IfcWorkControlTypeEnum), value.EnumVal, true);
                break;

            case 14:
                _userDefinedControlType = value.StringVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
                base.Parse(propIndex, value, nestedIndex);
                return;

            case 5:
                _identifier = value.StringVal;
                return;

            case 6:
                _creationDate = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 7:
                _creators.InternalAdd((IfcPerson)value.EntityVal);
                return;

            case 8:
                _purpose = value.StringVal;
                return;

            case 9:
                _duration = value.RealVal;
                return;

            case 10:
                _totalFloat = value.RealVal;
                return;

            case 11:
                _startTime = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 12:
                _finishTime = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 13:
                _workControlType = (IfcWorkControlTypeEnum)System.Enum.Parse(typeof(IfcWorkControlTypeEnum), value.EnumVal, true);
                return;

            case 14:
                _userDefinedControlType = value.StringVal;
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
Exemple #6
0
 public IfcConstraint(IfcLabel __Name, IfcText?__Description, IfcConstraintEnum __ConstraintGrade, IfcLabel?__ConstraintSource, IfcActorSelect __CreatingActor, IfcDateTimeSelect __CreationTime, IfcLabel?__UserDefinedGrade)
 {
     this._Name             = __Name;
     this._Description      = __Description;
     this._ConstraintGrade  = __ConstraintGrade;
     this._ConstraintSource = __ConstraintSource;
     this._CreatingActor    = __CreatingActor;
     this._CreationTime     = __CreationTime;
     this._UserDefinedGrade = __UserDefinedGrade;
 }
Exemple #7
0
 protected IfcWorkControl(DatabaseIfc db) : base(db)
 {
     mCreationDate = DateTime.Now;
     mStartTime    = DateTime.Now;
     if (db.Release < ReleaseVersion.IFC4)
     {
         mSSCreationDate = new IfcCalendarDate(db, DateTime.Now);
         mSSStartTime    = mSSCreationDate;
     }
 }
Exemple #8
0
 public IfcApproval(IfcText?__Description, IfcDateTimeSelect __ApprovalDateTime, IfcLabel?__ApprovalStatus, IfcLabel?__ApprovalLevel, IfcText?__ApprovalQualifier, IfcLabel __Name, IfcIdentifier __Identifier)
 {
     this._Description       = __Description;
     this._ApprovalDateTime  = __ApprovalDateTime;
     this._ApprovalStatus    = __ApprovalStatus;
     this._ApprovalLevel     = __ApprovalLevel;
     this._ApprovalQualifier = __ApprovalQualifier;
     this._Name       = __Name;
     this._Identifier = __Identifier;
 }
Exemple #9
0
 public IfcTimeSeries(IfcLabel __Name, IfcText?__Description, IfcDateTimeSelect __StartTime, IfcDateTimeSelect __EndTime, IfcTimeSeriesDataTypeEnum __TimeSeriesDataType, IfcDataOriginEnum __DataOrigin, IfcLabel?__UserDefinedDataOrigin, IfcUnit __Unit)
 {
     this._Name                  = __Name;
     this._Description           = __Description;
     this._StartTime             = __StartTime;
     this._EndTime               = __EndTime;
     this._TimeSeriesDataType    = __TimeSeriesDataType;
     this._DataOrigin            = __DataOrigin;
     this._UserDefinedDataOrigin = __UserDefinedDataOrigin;
     this._Unit                  = __Unit;
 }
Exemple #10
0
 public IfcCostSchedule(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcActorSelect __SubmittedBy, IfcActorSelect __PreparedBy, IfcDateTimeSelect __SubmittedOn, IfcLabel?__Status, IfcActorSelect[] __TargetUsers, IfcDateTimeSelect __UpdateDate, IfcIdentifier __ID, IfcCostScheduleTypeEnum __PredefinedType)
     : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType)
 {
     this._SubmittedBy    = __SubmittedBy;
     this._PreparedBy     = __PreparedBy;
     this._SubmittedOn    = __SubmittedOn;
     this._Status         = __Status;
     this._TargetUsers    = new HashSet <IfcActorSelect>(__TargetUsers);
     this._UpdateDate     = __UpdateDate;
     this._ID             = __ID;
     this._PredefinedType = __PredefinedType;
 }
Exemple #11
0
 public IfcWorkControl(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcIdentifier __Identifier, IfcDateTimeSelect __CreationDate, IfcPerson[] __Creators, IfcLabel?__Purpose, IfcTimeMeasure?__Duration, IfcTimeMeasure?__TotalFloat, IfcDateTimeSelect __StartTime, IfcDateTimeSelect __FinishTime, IfcWorkControlTypeEnum?__WorkControlType, IfcLabel?__UserDefinedControlType)
     : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType)
 {
     this._Identifier             = __Identifier;
     this._CreationDate           = __CreationDate;
     this._Creators               = new HashSet <IfcPerson>(__Creators);
     this._Purpose                = __Purpose;
     this._Duration               = __Duration;
     this._TotalFloat             = __TotalFloat;
     this._StartTime              = __StartTime;
     this._FinishTime             = __FinishTime;
     this._WorkControlType        = __WorkControlType;
     this._UserDefinedControlType = __UserDefinedControlType;
 }
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
                base.Parse(propIndex, value, nestedIndex);
                return;

            case 5:
                _submittedBy = (IfcActorSelect)(value.EntityVal);
                return;

            case 6:
                _preparedBy = (IfcActorSelect)(value.EntityVal);
                return;

            case 7:
                _submittedOn = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 8:
                _status = value.StringVal;
                return;

            case 9:
                _targetUsers.InternalAdd((IfcActorSelect)value.EntityVal);
                return;

            case 10:
                _updateDate = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 11:
                _iD = value.StringVal;
                return;

            case 12:
                _predefinedType = (IfcCostScheduleTypeEnum)System.Enum.Parse(typeof(IfcCostScheduleTypeEnum), value.EnumVal, true);
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
Exemple #13
0
        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:
                _SubmittedBy = (IfcActorSelect)value.EntityVal;
                break;

            case 6:
                _PreparedBy = (IfcActorSelect)value.EntityVal;
                break;

            case 7:
                _SubmittedOn = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 8:
                _Status = (IfcLabel)value.StringVal;
                break;

            case 10:
                _TargetUsers.Add((IfcActorSelect)value.EntityVal);
                break;

            case 11:
                _UpdateDate = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 12:
                _ID = (IfcIdentifier)value.EntityVal;
                break;

            case 13:
                _PredefinedType = (IfcCostScheduleTypeEnum)Enum.Parse(typeof(IfcCostScheduleTypeEnum), value.EnumVal);
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
Exemple #14
0
        public Tuple <DateTime, DateTime> ComputeAndSetScheduledStartFinishTimes()
        {
            DateTime scheduledStart = DateTime.MaxValue, scheduledFinish = DateTime.MinValue;
            List <IfcWorkControl> subControls = IsDecomposedBy.SelectMany(x => x.RelatedObjects).OfType <IfcWorkControl>().ToList();

            subControls.AddRange(IsNestedBy.SelectMany(x => x.RelatedObjects).OfType <IfcWorkControl>());
            foreach (IfcWorkControl workControl in subControls)
            {
                Tuple <DateTime, DateTime> startFinish = workControl.ComputeAndSetScheduledStartFinishTimes();
                if (startFinish.Item1 != DateTime.MinValue && startFinish.Item1 < scheduledStart)
                {
                    scheduledStart = startFinish.Item1;
                }
                if (startFinish.Item2 > scheduledFinish)
                {
                    scheduledFinish = startFinish.Item2;
                }
            }
            foreach (IfcTask task in Controls.SelectMany(x => x.RelatedObjects).OfType <IfcTask>())
            {
                Tuple <DateTime, DateTime> startFinish = task.computeScheduleStartFinish();
                if (startFinish.Item1 != DateTime.MinValue && startFinish.Item1 < scheduledStart)
                {
                    scheduledStart = startFinish.Item1;
                }
                if (startFinish.Item2 > scheduledFinish)
                {
                    scheduledFinish = startFinish.Item2;
                }
            }
            if (mDatabase.Release > ReleaseVersion.IFC2x3)
            {
                mStartTime  = scheduledStart;
                mFinishTime = scheduledFinish;
            }
            else
            {
                if (scheduledStart > DateTime.MinValue)
                {
                    mSSStartTime = new IfcDateAndTime(mDatabase, scheduledStart);
                }
                if (scheduledFinish > DateTime.MinValue)
                {
                    mSSFinishTime = new IfcDateAndTime(mDatabase, scheduledFinish);
                }
            }
            return(new Tuple <DateTime, DateTime>(scheduledStart, scheduledFinish));
        }
Exemple #15
0
        public void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
                _timeStamp = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 1:
                ((IXbimNoNotifyCollection)_listValues).Add((IfcValue)value.EntityVal);
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
Exemple #16
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _timeStamp = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 1:
                _listValues.InternalAdd((IfcValue)value.EntityVal);
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
        /// <summary>
        /// Get the string value for the IfcDateTimeSelect
        /// </summary>
        /// <param name="ifcDateTimeSelect">IfcDateTimeSelect</param>
        /// <returns>string</returns>
        public static string AsString(this IfcDateTimeSelect ifcDateTimeSelect)
        {
            var datetime = ifcDateTimeSelect as IfcDateAndTime;

            if (datetime != null)
            {
                var minute = 0;
                if (datetime.TimeComponent.MinuteComponent.HasValue)
                {
                    minute = (int)datetime.TimeComponent.MinuteComponent.Value;
                }
                var second = 0;
                if (datetime.TimeComponent.SecondComponent.HasValue)
                {
                    second = (int)datetime.TimeComponent.SecondComponent.Value;
                }
                return(new DateTime((int)datetime.DateComponent.YearComponent, (int)datetime.DateComponent.MonthComponent, (int)datetime.DateComponent.DayComponent, (int)datetime.TimeComponent.HourComponent, minute, second).ToString(CultureInfo.InvariantCulture));
            }
            var calendarDate = ifcDateTimeSelect as IfcCalendarDate;

            if (calendarDate != null)
            {
                var date = calendarDate;
                return(new DateTime((int)date.YearComponent, (int)date.MonthComponent, (int)date.DayComponent).ToString("d"));
            }
            var localTime = ifcDateTimeSelect as IfcLocalTime;

            if (localTime != null)
            {
                var time   = localTime;
                var minute = 0;
                if (time.MinuteComponent.HasValue)
                {
                    minute = (int)time.MinuteComponent.Value;
                }
                var second = 0;
                if (time.SecondComponent.HasValue)
                {
                    second = (int)time.SecondComponent.Value;
                }
                return(new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, (int)time.HourComponent, minute, second).ToString("HH:mm:ss"));
            }
            return(string.Empty);
        }
        public virtual void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
                _name = value.StringVal;
                break;

            case 1:
                _description = value.StringVal;
                break;

            case 2:
                _startTime = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 3:
                _endTime = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 4:
                _timeSeriesDataType =
                    (IfcTimeSeriesDataTypeEnum)Enum.Parse(typeof(IfcTimeSeriesDataTypeEnum), value.EnumVal, true);
                break;

            case 5:
                _dataOrigin = (IfcDataOriginEnum)Enum.Parse(typeof(IfcDataOriginEnum), value.EnumVal, true);
                break;

            case 6:
                _userDefinedDataOrigin = value.StringVal;
                break;

            case 7:
                _unit = (IfcUnit)value.EntityVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
Exemple #19
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _name = value.StringVal;
                return;

            case 1:
                _description = value.StringVal;
                return;

            case 2:
                _startTime = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 3:
                _endTime = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 4:
                _timeSeriesDataType = (IfcTimeSeriesDataTypeEnum)System.Enum.Parse(typeof(IfcTimeSeriesDataTypeEnum), value.EnumVal, true);
                return;

            case 5:
                _dataOrigin = (IfcDataOriginEnum)System.Enum.Parse(typeof(IfcDataOriginEnum), value.EnumVal, true);
                return;

            case 6:
                _userDefinedDataOrigin = value.StringVal;
                return;

            case 7:
                _unit = (IfcUnit)(value.EntityVal);
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
Exemple #20
0
 public IfcScheduleTimeControl(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcLabel?__ObjectType, IfcDateTimeSelect __ActualStart, IfcDateTimeSelect __EarlyStart, IfcDateTimeSelect __LateStart, IfcDateTimeSelect __ScheduleStart, IfcDateTimeSelect __ActualFinish, IfcDateTimeSelect __EarlyFinish, IfcDateTimeSelect __LateFinish, IfcDateTimeSelect __ScheduleFinish, IfcTimeMeasure?__ScheduleDuration, IfcTimeMeasure?__ActualDuration, IfcTimeMeasure?__RemainingTime, IfcTimeMeasure?__FreeFloat, IfcTimeMeasure?__TotalFloat, Boolean?__IsCritical, IfcDateTimeSelect __StatusTime, IfcTimeMeasure?__StartFloat, IfcTimeMeasure?__FinishFloat, IfcPositiveRatioMeasure?__Completion)
     : base(__GlobalId, __OwnerHistory, __Name, __Description, __ObjectType)
 {
     this._ActualStart      = __ActualStart;
     this._EarlyStart       = __EarlyStart;
     this._LateStart        = __LateStart;
     this._ScheduleStart    = __ScheduleStart;
     this._ActualFinish     = __ActualFinish;
     this._EarlyFinish      = __EarlyFinish;
     this._LateFinish       = __LateFinish;
     this._ScheduleFinish   = __ScheduleFinish;
     this._ScheduleDuration = __ScheduleDuration;
     this._ActualDuration   = __ActualDuration;
     this._RemainingTime    = __RemainingTime;
     this._FreeFloat        = __FreeFloat;
     this._TotalFloat       = __TotalFloat;
     this._IsCritical       = __IsCritical;
     this._StatusTime       = __StatusTime;
     this._StartFloat       = __StartFloat;
     this._FinishFloat      = __FinishFloat;
     this._Completion       = __Completion;
 }
 /// <summary>
 /// Get the string value for the IfcDateTimeSelect
 /// </summary>
 /// <param name="ifcDateTimeSelect">IfcDateTimeSelect</param>
 /// <returns>string</returns>
 public static string GetAsString(this IfcDateTimeSelect ifcDateTimeSelect)
 {
     if (ifcDateTimeSelect is IfcDateAndTime)
     {
         IfcDateAndTime datetime = (ifcDateTimeSelect as IfcDateAndTime);
         int            minute   = 0;
         if (datetime.TimeComponent.MinuteComponent.HasValue)
         {
             minute = (int)datetime.TimeComponent.MinuteComponent.Value;
         }
         int second = 0;
         if (datetime.TimeComponent.SecondComponent.HasValue)
         {
             second = (int)datetime.TimeComponent.SecondComponent.Value;
         }
         return(new DateTime(datetime.DateComponent.YearComponent, datetime.DateComponent.MonthComponent, datetime.DateComponent.DayComponent, datetime.TimeComponent.HourComponent, minute, second).ToString());
     }
     if (ifcDateTimeSelect is IfcCalendarDate)
     {
         IfcCalendarDate date = (ifcDateTimeSelect as IfcCalendarDate);
         return(new DateTime(date.YearComponent, date.MonthComponent, date.DayComponent).ToString("d"));
     }
     if (ifcDateTimeSelect is IfcLocalTime)
     {
         IfcLocalTime time   = (ifcDateTimeSelect as IfcLocalTime);
         int          minute = 0;
         if (time.MinuteComponent.HasValue)
         {
             minute = (int)time.MinuteComponent.Value;
         }
         int second = 0;
         if (time.SecondComponent.HasValue)
         {
             second = (int)time.SecondComponent.Value;
         }
         return(new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, time.HourComponent, minute, second).ToString("HH:mm:ss"));
     }
     return(string.Empty);
 }
        public virtual void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
                _name = value.StringVal;
                break;

            case 1:
                _description = value.StringVal;
                break;

            case 2:
                _constraintGrade = (IfcConstraintEnum)Enum.Parse(typeof(IfcConstraintEnum), value.EnumVal);
                break;

            case 3:
                _constraintSource = value.StringVal;
                break;

            case 4:
                _creatingActor = (IfcActorSelect)value.EntityVal;
                break;

            case 5:
                _creationTime = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 6:
                _userDefinedGrade = value.StringVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
Exemple #23
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
                base.Parse(propIndex, value, nestedIndex);
                return;

            case 5:
                _criterion = (IfcConditionCriterionSelect)(value.EntityVal);
                return;

            case 6:
                _criterionDateTime = (IfcDateTimeSelect)(value.EntityVal);
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
Exemple #24
0
        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:
                _criterion = (IfcConditionCriterionSelect)value.EntityVal;
                break;

            case 6:
                _criterionDateTime = (IfcDateTimeSelect)value.EntityVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
Exemple #25
0
        public static string ToISODateTimeString(this IfcDateTimeSelect ifcDateTimeSelect)
        {
            var dateAndTime = ifcDateTimeSelect as IfcDateAndTime;

            if (dateAndTime != null)
            {
                return(dateAndTime.ToISODateTimeString());
            }
            var calendarDate = ifcDateTimeSelect as IfcCalendarDate;

            if (calendarDate != null)
            {
                return(ToISODateTimeString(calendarDate));
            }
            var localTime = ifcDateTimeSelect as IfcLocalTime;

            if (localTime != null)
            {
                return(ToISODateTimeString(localTime));
            }
            var dateTime = new DateTime(1, 1, 1, 12, 0, 0);

            return(dateTime.ToString("yyyy-MM-ddThh:mm:ss"));
        }
Exemple #26
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _description = value.StringVal;
                return;

            case 1:
                _approvalDateTime = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 2:
                _approvalStatus = value.StringVal;
                return;

            case 3:
                _approvalLevel = value.StringVal;
                return;

            case 4:
                _approvalQualifier = value.StringVal;
                return;

            case 5:
                _name = value.StringVal;
                return;

            case 6:
                _identifier = value.StringVal;
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
Exemple #27
0
        public virtual void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
                _description = value.StringVal;
                break;

            case 1:
                _approvalDateTime = (IfcDateTimeSelect)value.EntityVal;
                break;

            case 2:
                _approvalStatus = value.StringVal;
                break;

            case 3:
                _approvalLevel = value.StringVal;
                break;

            case 4:
                _approvalQualifier = value.StringVal;
                break;

            case 5:
                _name = value.StringVal;
                break;

            case 6:
                _identifier = value.StringVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _name = value.StringVal;
                return;

            case 1:
                _description = value.StringVal;
                return;

            case 2:
                _constraintGrade = (IfcConstraintEnum)System.Enum.Parse(typeof(IfcConstraintEnum), value.EnumVal, true);
                return;

            case 3:
                _constraintSource = value.StringVal;
                return;

            case 4:
                _creatingActor = (IfcActorSelect)(value.EntityVal);
                return;

            case 5:
                _creationTime = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 6:
                _userDefinedGrade = value.StringVal;
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
 //SUBTYPE OF (	IfcControl);
 //ActualStart	 : 	OPTIONAL IfcDateTimeSelect;
 //EarlyStart	 : 	OPTIONAL IfcDateTimeSelect;
 //LateStart	 : 	OPTIONAL IfcDateTimeSelect;
 //ScheduleStart	 : 	OPTIONAL IfcDateTimeSelect;
 //ActualFinish	 : 	OPTIONAL IfcDateTimeSelect;
 //EarlyFinish	 : 	OPTIONAL IfcDateTimeSelect;
 //LateFinish	 : 	OPTIONAL IfcDateTimeSelect;
 //ScheduleFinish	 : 	OPTIONAL IfcDateTimeSelect;
 //ScheduleDuration	 : 	OPTIONAL IfcTimeMeasure;
 //ActualDuration	 : 	OPTIONAL IfcTimeMeasure;
 //RemainingTime	 : 	OPTIONAL IfcTimeMeasure;
 //FreeFloat	 : 	OPTIONAL IfcTimeMeasure;
 //TotalFloat	 : 	OPTIONAL IfcTimeMeasure;
 //IsCritical	 : 	OPTIONAL BOOLEAN;
 //StatusTime	 : 	OPTIONAL IfcDateTimeSelect;
 //StartFloat	 : 	OPTIONAL IfcTimeMeasure;
 //FinishFloat	 : 	OPTIONAL IfcTimeMeasure;
 //Completion	 : 	OPTIONAL IfcPositiveRatioMeasure;
 //INVERSE
 //ScheduleTimeControlAssigned	 : 	IfcRelAssignsTasks FOR TimeForTask;
 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:
             _actualStart = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 6:
             _earlyStart = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 7:
             _lateStart = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 8:
             _scheduleStart = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 9:
             _actualFinish = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 10:
             _earlyFinish = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 11:
             _lateFinish = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 12:
             _scheduleFinish = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 13:
             _scheduleDuration = (IfcTimeMeasure)value.RealVal;
             break;
         case 14:
             _actualDuration = (IfcTimeMeasure)value.RealVal;
             break;
         case 15:
             _remainingTime = (IfcTimeMeasure)value.RealVal;
             break;
         case 16:
             _freeFloat = (IfcTimeMeasure)value.RealVal;
             break;
         case 17:
             _totalFloat = (IfcTimeMeasure)value.RealVal;
             break;
         case 18:
             _isCritical = (IfcBoolean)value.BooleanVal;
             break;
         case 19:
             _statusTime = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 20:
             _startFloat = (IfcTimeMeasure)value.RealVal;
             break;
         case 21:
             _finishFloat = (IfcTimeMeasure)value.RealVal;
             break;
         case 22:
             _completion = (IfcPositiveRatioMeasure)value.RealVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
 public void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _timeStamp = (IfcDateTimeSelect) value.EntityVal;
             break;
         case 1:
             _listValues.Add_Reversible((IfcValue) 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:
             base.IfcParse(propIndex, value);
             break;
         case 5:
             _SubmittedBy = (IfcActorSelect)value.EntityVal;
             break;
         case 6:
             _PreparedBy = (IfcActorSelect)value.EntityVal;
             break;
         case 7:
             _SubmittedOn = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 8:
             _Status = (IfcLabel)value.StringVal;
             break;
         case 10:
               _TargetUsers.Add((IfcActorSelect)value.EntityVal);
               break;
         case 11:
              _UpdateDate = (IfcDateTimeSelect)value.EntityVal;
              break;
         case 12:
              _ID = (IfcIdentifier)value.EntityVal;
              break;
         case 13:
              _PredefinedType = (IfcCostScheduleTypeEnum)Enum.Parse(typeof(IfcCostScheduleTypeEnum), value.EnumVal);
              break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
                base.Parse(propIndex, value, nestedIndex);
                return;

            case 5:
                _actualStart = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 6:
                _earlyStart = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 7:
                _lateStart = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 8:
                _scheduleStart = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 9:
                _actualFinish = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 10:
                _earlyFinish = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 11:
                _lateFinish = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 12:
                _scheduleFinish = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 13:
                _scheduleDuration = value.RealVal;
                return;

            case 14:
                _actualDuration = value.RealVal;
                return;

            case 15:
                _remainingTime = value.RealVal;
                return;

            case 16:
                _freeFloat = value.RealVal;
                return;

            case 17:
                _totalFloat = value.RealVal;
                return;

            case 18:
                _isCritical = value.BooleanVal;
                return;

            case 19:
                _statusTime = (IfcDateTimeSelect)(value.EntityVal);
                return;

            case 20:
                _startFloat = value.RealVal;
                return;

            case 21:
                _finishFloat = value.RealVal;
                return;

            case 22:
                _completion = value.RealVal;
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
        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:
         case 2:
         case 3:
         case 4:
             base.IfcParse(propIndex, value);
             break;
         case 5:
             _identifier = (IfcIdentifier)value.StringVal;
             break;
         case 6:
             _creationDate = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 7:
             _creators.Add((IfcPerson)value.EntityVal);
             break;
         case 8:
             _purpose = value.StringVal;
             break;
         case 9:
             _duration = value.RealVal;
             break;
         case 10:
             _totalFloat = value.RealVal;
             break;
         case 11:
             _startTime = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 12:
             _finishTime = (IfcDateTimeSelect)value.EntityVal;
             break;
         case 13:
             _workControlType = (IfcWorkControlTypeEnum)Enum.Parse(typeof(IfcWorkControlTypeEnum), value.EnumVal, true);
             break;
         case 14:
             _userDefinedControlType = value.StringVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Exemple #35
0
 public virtual void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _description = value.StringVal;
             break;
         case 1:
             _approvalDateTime = (IfcDateTimeSelect) value.EntityVal;
             break;
         case 2:
             _approvalStatus = value.StringVal;
             break;
         case 3:
             _approvalLevel = value.StringVal;
             break;
         case 4:
             _approvalQualifier = value.StringVal;
             break;
         case 5:
             _name = value.StringVal;
             break;
         case 6:
             _identifier = value.StringVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
 public void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _timeStamp = (IfcDateTimeSelect) value.EntityVal;
             break;
         case 1:
             ((IXbimNoNotifyCollection)_listValues).Add((IfcValue) value.EntityVal);
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
 public IfcRegularTimeSeries(IfcLabel __Name, IfcText?__Description, IfcDateTimeSelect __StartTime, IfcDateTimeSelect __EndTime, IfcTimeSeriesDataTypeEnum __TimeSeriesDataType, IfcDataOriginEnum __DataOrigin, IfcLabel?__UserDefinedDataOrigin, IfcUnit __Unit, IfcTimeMeasure __TimeStep, IfcTimeSeriesValue[] __Values)
     : base(__Name, __Description, __StartTime, __EndTime, __TimeSeriesDataType, __DataOrigin, __UserDefinedDataOrigin, __Unit)
 {
     this._TimeStep = __TimeStep;
     this._Values   = new List <IfcTimeSeriesValue>(__Values);
 }
Exemple #38
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:
             _startTime = (IfcDateTimeSelect) value.EntityVal;
             break;
         case 3:
             _endTime = (IfcDateTimeSelect) value.EntityVal;
             break;
         case 4:
             _timeSeriesDataType =
                 (IfcTimeSeriesDataTypeEnum) Enum.Parse(typeof (IfcTimeSeriesDataTypeEnum), value.EnumVal, true);
             break;
         case 5:
             _dataOrigin = (IfcDataOriginEnum) Enum.Parse(typeof (IfcDataOriginEnum), value.EnumVal, true);
             break;
         case 6:
             _userDefinedDataOrigin = value.StringVal;
             break;
         case 7:
             _unit = (IfcUnit) value.EntityVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
Exemple #39
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:
             _constraintGrade = (IfcConstraintEnum) Enum.Parse(typeof (IfcConstraintEnum), value.EnumVal);
             break;
         case 3:
             _constraintSource = value.StringVal;
             break;
         case 4:
             _creatingActor = (IfcActorSelect) value.EntityVal;
             break;
         case 5:
             _creationTime = (IfcDateTimeSelect) value.EntityVal;
             break;
         case 6:
             _userDefinedGrade = value.StringVal;
             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:
             base.IfcParse(propIndex, value);
             break;
         case 5:
             _criterion = (IfcConditionCriterionSelect)value.EntityVal;
             break;
         case 6:
             _criterionDateTime  = (IfcDateTimeSelect)value.EntityVal;
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }