public static IfcValue GetPropertyTableItemValue(this Xbim.Ifc2x3.Kernel.IfcObject obj, string pSetName, string propertyTableName, IfcValue definingValue)
        {
            IfcPropertyTableValue table = GetPropertyTableValue(obj, pSetName, propertyTableName);

            if (table == null)
            {
                return(null);
            }
            XbimList <IfcValue> definingValues = table.DefiningValues;

            if (definingValues == null)
            {
                return(null);
            }
            if (!definingValues.Contains(definingValue))
            {
                return(null);
            }
            int index = definingValues.IndexOf(definingValue);

            if (table.DefinedValues.Count < index + 1)
            {
                return(null);
            }
            return(table.DefinedValues[index]);
        }
        public override void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
                base.IfcParse(propIndex, value);
                break;

            case 1:
                if (_fontFamily == null)
                {
                    _fontFamily = new XbimList <IfcTextFontName>(this);
                }
                if (value.Type == IfcParserType.String)
                {
                    _fontFamily.Add(new IfcTextFontName(value.StringVal));
                }
                else
                {
                    _fontFamily.Add((IfcTextFontName)value.EntityVal);
                }
                break;

            case 2:
                _fontStyle = value.StringVal;
                break;

            case 3:
                _fontVariant = value.StringVal;
                break;

            case 4:
                _fontWeight = value.StringVal;
                break;

            case 5:
                _fontSize = (IfcSizeSelect)value.EntityVal;
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
示例#3
0
        public static Dictionary <IfcValue, IfcValue> GetAsDictionary(this IfcPropertyTableValue table)
        {
            Dictionary <IfcValue, IfcValue> result         = new Dictionary <IfcValue, IfcValue>();
            XbimList <IfcValue>             definingValues = table.DefiningValues;
            XbimList <IfcValue>             definedValues  = table.DefinedValues;

            if (definedValues == null || definingValues == null)
            {
                return(result);
            }
            int count = definingValues.Count;

            if (count != definedValues.Count)
            {
                throw new Exception(
                          "Inconsistent properties table. Number of defined and defining values are different.");
            }

            for (int i = 0; i < count; i++)
            {
                result.Add(definingValues[i], definedValues[i]);
            }
            return(result);
        }
 public IfcRelConnectsPathElements()
 {
     _relatingPriorities = new XbimList<long>(this);
     _relatedPriorities = new XbimList<long>(this);
 }
 public IfcRegularTimeSeries()
 {
     _values = new XbimList<IfcTimeSeriesValue>(this);
 }
示例#6
0
 public IfcMaterialList()
 {
     _materials = new XbimList <IfcMaterial>(this);
 }
 public IfcProductRepresentation()
 {
     _representations = new XbimList<IfcRepresentation>(this);
 }
 public IfcPropertyTableValue()
 {
     _definingValues = new XbimList<IfcValue>(this);
     _definedValues = new XbimList<IfcValue>(this);
 }
 public IfcIrregularTimeSeriesValue()
 {
     _listValues = new XbimList<IfcValue>(this);
 }
 public IfcPropertyListValue(IfcIdentifier name)
     : base(name)
 {
     _listValues = new XbimList<IfcValue>(this);
 }
示例#11
0
 public IfcCurveStyleFont()
 {
     _patternList = new XbimList<IfcCurveStyleFontPattern>(this);
 }
示例#12
0
 public IfcTableRow()
 {
     _rowCells = new XbimList <IfcValue>(this);
 }
示例#13
0
 public IfcSectionedSpine()
 {
     _crossSections         = new XbimList <IfcProfileDef>(this);
     _crossSectionPositions = new XbimList <IfcAxis2Placement3D>(this);
 }
示例#14
0
 public IfcProductRepresentation()
 {
     _representations = new XbimList <IfcRepresentation>(this);
 }
 public IfcPropertyEnumeration()
 {
     _enumerationValues = new XbimList <IfcValue>(this);
 }
 public IfcSurfaceStyleWithTextures()
 {
     _textures = new XbimList <IfcSurfaceTexture>(this);
 }
示例#17
0
 public IfcMaterialList()
 {
     _materials = new XbimList<IfcMaterial>(this);
 }
 public IfcReinforcementDefinitionProperties()
 {
     _reinforcementSectionDefinitions = new XbimList <IfcSectionReinforcementProperties>(this);
 }
示例#19
0
 public IfcRationalBezierCurve()
 {
     _weightsData = new XbimList <double>(this);
 }
 public IfcStructuralSurfaceMemberVarying()
 {
     _subsequentThickness = new XbimList<IfcPositiveLengthMeasure>(this);
 }
示例#21
0
 public IfcEdgeLoop()
 {
     _edgeList = new XbimList <IfcOrientedEdge>(this, 4);
 }
示例#22
0
 public IfcTable()
 {
     _rows = new XbimList <IfcTableRow>(this);
 }
 public IfcReinforcementDefinitionProperties()
 {
     _reinforcementSectionDefinitions = new XbimList<IfcSectionReinforcementProperties>(this);
 }
 public IfcRelServicesBuildings()
 {
     _relatedBuildings = new XbimList <IfcSpatialStructureElement>(this);
 }
 public IfcVirtualGridIntersection()
 {
     _intersectingAxes = new XbimListUnique<IfcGridAxis>(this);
     _offsetDistances = new XbimList<IfcLengthMeasure>(this);
 }
示例#26
0
 public IfcPropertyTableValue()
 {
     _definingValues = new XbimList <IfcValue>(this);
     _definedValues  = new XbimList <IfcValue>(this);
 }
        public override void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
                case 0:
                    base.IfcParse(propIndex, value);
                    break;
                case 1:
                    if (_fontFamily == null) _fontFamily = new XbimList<IfcTextFontName>(this);
                    if (value.Type == IfcParserType.String)
                        _fontFamily.Add(new IfcTextFontName(value.StringVal));
                    else

                        _fontFamily.Add((IfcTextFontName)value.EntityVal);
                    break;
                case 2:
                    _fontStyle = value.StringVal;
                    break;
                case 3:
                    _fontVariant = value.StringVal;
                    break;
                case 4:
                    _fontWeight = value.StringVal;
                    break;
                case 5:
                    _fontSize = (IfcSizeSelect) value.EntityVal;
                    break;
                default:
                    this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
 public IfcRelServicesBuildings()
 {
     _relatedBuildings = new XbimList<IfcSpatialStructureElement>(this);
 }
 public IfcRationalBezierCurve()
 {
     _weightsData = new XbimList<double>(this);
 }
 public IfcSectionedSpine()
 {
     _crossSections = new XbimList<IfcProfileDef>(this);
     _crossSectionPositions = new XbimList<IfcAxis2Placement3D>(this);
 }
 public IfcSurfaceStyleWithTextures()
 {
     _textures = new XbimList<IfcSurfaceTexture>(this);
 }
 public IfcVirtualGridIntersection()
 {
     _intersectingAxes = new XbimListUnique <IfcGridAxis>(this);
     _offsetDistances  = new XbimList <IfcLengthMeasure>(this);
 }
示例#33
0
 public IfcTableRow()
 {
     _rowCells = new XbimList<IfcValue>(this);
 }
示例#34
0
 public IfcIrregularTimeSeriesValue()
 {
     _listValues = new XbimList <IfcValue>(this);
 }
 public IfcPropertyListValue()
 {
     _listValues = new XbimList<IfcValue>(this);
 }
示例#36
0
 public IfcPropertyListValue()
 {
     _listValues = new XbimList <IfcValue>(this);
 }
 public IfcStructuralSurfaceMemberVarying()
 {
     _subsequentThickness = new XbimList <IfcPositiveLengthMeasure>(this);
 }
示例#38
0
 public IfcPropertyListValue(IfcIdentifier name)
     : base(name)
 {
     _listValues = new XbimList <IfcValue>(this);
 }
示例#39
0
 public IfcEdgeLoop()
 {
     _edgeList = new XbimList<IfcOrientedEdge>(this, 4);
 }
 public IfcTimeSeriesValue()
 {
     _listValues = new XbimList<object>(this);
 }
示例#41
0
 public IfcTimeSeriesValue()
 {
     _listValues = new XbimList <object>(this);
 }
示例#42
0
 public IfcCurveStyleFont()
 {
     _patternList = new XbimList <IfcCurveStyleFontPattern>(this);
 }
 public IfcPropertyEnumeration()
 {
     _enumerationValues = new XbimList<IfcValue>(this);
 }
 public IfcRegularTimeSeries()
 {
     _values = new XbimList <IfcTimeSeriesValue>(this);
 }
示例#45
0
 public IfcTable()
 {
     _rows = new XbimList<IfcTableRow>(this);
 }
 public IfcRelConnectsPathElements()
 {
     _relatingPriorities = new XbimList <long>(this);
     _relatedPriorities  = new XbimList <long>(this);
 }