using (var model = IfcStore.Open(_FilePath))
{
var allInstances = model.Instances;
var testList = model.Instances.OfType<IIfcBuildingElement>();
var nameList = new List<string>();
var objTypeList = new List<string>();
foreach (var item in testList)
{
var objType = item.IsTypedBy;
var firstObjType = objType.ElementAt(0);
var relType = firstObjType.RelatingType;
var name = item.Name;
nameList.Add(name);
}
}
Would appreciate any help
thanks to @martin1cerny
the answer was quite simple:
var testList = model.Instances.OfType<IIfcBuildingElement>().GroupBy(e => e.GetType());