public void AttatchTo(IfElement element) { IfElements.Add(element); var ifcModel = IfModel.IfcStore; element.IfMaterial = this; using (var ctx = ifcModel.BeginTransaction("Attatching Elment")) { //attach material to specific element var m = (IfcRelAssociatesMaterial)ifcModel.Instances.Where(e => e.EntityLabel == Label).FirstOrDefault(); m.RelatedObjects.Add(element.IfcElement); ctx.Commit(); } }
public IfProperties(IfElement ifElement) { IfElement = ifElement; SingleValueProperties = new Dictionary <string, List <IfSingleValue> >(); Quanatities = new Dictionary <string, List <IfQuantity> >(); }