xBimTeam / XbimEssentials

A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
https://xbimteam.github.io/
Other
497 stars 174 forks source link

Read-only IfcIrregularTimeSeriesValue.ListValues #164

Closed nelsonmunoz closed 6 years ago

nelsonmunoz commented 6 years ago

Expected behavior:

Being able to set IfcIrregularTimeSeriesValue.ListValues I need to record sensor values to the model, updating (adding) values on an irregular time series.

Actual behavior or exception details:

I can only see read-only / get methods, what am i missing here? Is there an alternative way to do this? I am new to xBIM, so if I had to implement this myself, I'd appreciate a nudge in the right direction, or just know if there is any reason to not being able to set this, database structure for it, etc?

Versions of xBIM Packages:

Xbim.WindowsUI 4.0.11

Minimal code (or steps) to reproduce the issue:

On the interface:

        /// <summary>
        /// Readonly interface for IfcIrregularTimeSeriesValue
        /// </summary>
    // ReSharper disable once PartialTypeWithSinglePart
    public partial interface @IIfcIrregularTimeSeriesValue : IPersistEntity
    {
        IfcDateTime @TimeStamp { get;  set; }
        IItemSet<IIfcValue> @ListValues { get; }

    }

On the implementation:

        [EntityAttribute(2, EntityAttributeState.Mandatory, EntityAttributeType.List, EntityAttributeType.Class, 1, -1, 2)]
        public IItemSet<IfcValue> @ListValues 
        { 
            get 
            {
                if(_activated) return _listValues;
                Activate();
                return _listValues;
            } 
        }   
nelsonmunoz commented 6 years ago

Just noticed it's initialized by the constructor and I see I'm supposed to operate on it through it's inherited methods. Sorry for the newb q