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:
             _relatingResource = (IfcResource) value.EntityVal;
             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:
            case 5:
                base.Parse(propIndex, value, nestedIndex);
                return;

            case 6:
                _relatingResource = (IfcResource)(value.EntityVal);
                return;

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

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Create the relationships between the Resource and the types it relates too
 /// </summary>
 /// <param name="processObj">IfcResource Object</param>
 /// <param name="typeObjs">IEnumerable of IfcTypeObject, list of IfcTypeObjects </param>
 public void SetRelAssignsToResource(IfcResource resourceObj, IEnumerable<IfcTypeObject> typeObjs)
 {
     //find any existing relationships to this type
     IfcRelAssignsToResource processRel = Model.Instances.Where<IfcRelAssignsToResource>(rd => rd.RelatingResource == resourceObj).FirstOrDefault();
     if (processRel == null) //none defined create the relationship
     {
         processRel = Model.Instances.New<IfcRelAssignsToResource>();
         processRel.RelatingResource = resourceObj;
         
         
     }
     //add the type objects
     foreach (IfcTypeObject type in typeObjs)
     {
         processRel.RelatedObjects.Add_Reversible(type);
     }
 }