public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: case 1: case 2: case 3: base.Parse(propIndex, value, nestedIndex); return; case 4: _relatingProcess = (IfcProcess)(value.EntityVal); return; case 5: _relatedProcess = (IfcProcess)(value.EntityVal); return; case 6: _timeLag = (IfcLagTime)(value.EntityVal); return; case 7: _sequenceType = (IfcSequenceEnum)System.Enum.Parse(typeof(IfcSequenceEnum), value.EnumVal, true); return; case 8: _userDefinedSequenceType = value.StringVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public IfcRelSequence(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcProcess __RelatingProcess, IfcProcess __RelatedProcess, IfcLagTime __TimeLag, IfcSequenceEnum?__SequenceType, IfcLabel?__UserDefinedSequenceType) : base(__GlobalId, __OwnerHistory, __Name, __Description) { this._RelatingProcess = __RelatingProcess; this._RelatedProcess = __RelatedProcess; this._TimeLag = __TimeLag; this._SequenceType = __SequenceType; this._UserDefinedSequenceType = __UserDefinedSequenceType; }
/// <summary> /// Create the relationships between the Process and the types it relates too /// </summary> /// <param name="processObj">IfcProcess Object</param> /// <param name="typeObjs">IEnumerable of IfcTypeObject, list of IfcTypeObjects </param> public void SetRelAssignsToProcess(IfcProcess processObj, IEnumerable <IfcObjectDefinition> typeObjs) { //find any existing relationships to this type IfcRelAssignsToProcess processRel = Model.Instances.Where <IfcRelAssignsToProcess>(rd => rd.RelatingProcess == processObj).FirstOrDefault(); if (processRel == null) //none defined create the relationship { processRel = Model.Instances.New <IfcRelAssignsToProcess>(); processRel.RelatingProcess = processObj; } //add the type objects foreach (IfcObjectDefinition type in typeObjs) { if (!processRel.RelatedObjects.Contains(type)) { processRel.RelatedObjects.Add(type); } } }