public IfcReferencesValueDocument(IfcDocumentSelect __ReferencedDocument, IfcAppliedValue[] __ReferencingValues, IfcLabel?__Name, IfcText?__Description) { this._ReferencedDocument = __ReferencedDocument; this._ReferencingValues = new HashSet <IfcAppliedValue>(__ReferencingValues); this._Name = __Name; this._Description = __Description; }
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: _relatingDocument = (IfcDocumentSelect) 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: base.Parse(propIndex, value, nestedIndex); return; case 5: _relatingDocument = (IfcDocumentSelect)(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: base.IfcParse(propIndex, value); break; case 5: _relatingDocument = (IfcDocumentSelect)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
/// <summary> /// Return a document object list, in case IfcDocumentInformation.DocumentReferences more than one file /// </summary> /// <param name="ifcDocumentSelect"></param> /// <returns></returns> public List <Document> MappingMulti(IfcDocumentSelect ifcDocumentSelect) { List <Document> docList = new List <Document>(); Helper = ((IfcToCOBieLiteUkExchanger)Exchanger).Helper; //process IfcDocumentReference first if (ifcDocumentSelect is IfcDocumentReference) { var ifcDocumentReference = ifcDocumentSelect as IfcDocumentReference; if (ifcDocumentReference.ReferenceToDocument != null) { docList.Add(ConvertToDocument(ifcDocumentReference, ifcDocumentReference.ReferenceToDocument.FirstOrDefault()));//ReferenceToDocument is a SET [0:1] return(docList); } } //must be IfcDocumentInformation var ifcDocumentInformation = ifcDocumentSelect as IfcDocumentInformation; if (ifcDocumentInformation.DocumentReferences != null) { foreach (IfcDocumentReference ifcDocumentReference in ifcDocumentInformation.DocumentReferences) { docList.Add(ConvertToDocument(ifcDocumentReference, ifcDocumentInformation)); } } //Do the children files var childDocList = GetChildDocs(ifcDocumentInformation); //link child documents to first document in the list var linkDoc = docList.FirstOrDefault(); if (linkDoc != null) { linkDoc.Documents = childDocList; } else //no docs to link too, then just add to the root document list { docList.Concat(childDocList); } return(docList); }
public static void AddDocument(this IfcDefinitionSelect definition, IfcDocumentSelect doc) { var i = definition.Model.Instances; i.New <IfcRelAssociatesDocument>(r => { r.RelatedObjects.Add(definition); r.RelatingDocument = doc; }); if (cache.TryGetValue(definition, out List <IIfcDocumentSelect> docs)) { docs.Add(doc); } else { docs = new List <IIfcDocumentSelect> { doc }; cache.Add(definition, docs); } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _referencedDocument = (IfcDocumentSelect)(value.EntityVal); return; case 1: _referencingValues.InternalAdd((IfcAppliedValue)value.EntityVal); return; case 2: _name = value.StringVal; return; case 3: _description = value.StringVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _referencedDocument = (IfcDocumentSelect)value.EntityVal; break; case 1: ((IXbimNoNotifyCollection)_referencingValues).Add((IfcAppliedValue)value.EntityVal); break; case 2: _name = value.StringVal; break; case 3: _description = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IfcRelAssociatesDocument(IfcGloballyUniqueId __GlobalId, IfcOwnerHistory __OwnerHistory, IfcLabel?__Name, IfcText?__Description, IfcRoot[] __RelatedObjects, IfcDocumentSelect __RelatingDocument) : base(__GlobalId, __OwnerHistory, __Name, __Description, __RelatedObjects) { this._RelatingDocument = __RelatingDocument; }
internal IfcRelAssociatesDocument(IfcDocumentSelect document) : base(document.Database) { Name = "DocAssoc"; Description = "Document Associates"; mRelatingDocument = document.Index; document.Associates.Add(this); }
public IfcRelAssociatesDocument(IfcDefinitionSelect related, IfcDocumentSelect document) : base(related) { mRelatingDocument = document.Index; }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _referencedDocument = (IfcDocumentSelect) value.EntityVal; break; case 1: ((IXbimNoNotifyCollection)_referencingValues).Add((IfcAppliedValue) value.EntityVal); break; case 2: _name = value.StringVal; break; case 3: _description = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
protected override Document Mapping(IfcDocumentSelect source, Document target) { throw new NotImplementedException(); //see MappingMulti method }