xBimTeam / XbimExchange

XbimExchange contains several COBie schemas and serialisation functions as well as the Model Validation library adopted by theNBS digital toolkit.
https://xbimteam.github.io/
Other
46 stars 41 forks source link

Guidance for creating Cobie mappings from IFC #13

Open Jero9999 opened 7 years ago

Jero9999 commented 7 years ago

Hi there

I have created an IFC model using XBim library. Now I need to generate a cobie file from that model. I have some code to generate the cobie file but it is mostly empty/default. I think the problem is that there are no mappings for the IFC objects that contain the data. The IFC objects I am putting data into are

Looking in the XBimExchange code I can't see any mappings for these guys. I can see how I should be creating new mappings but I can't see how to pass those mappings in to the Exchanger object.

The code I am using to create the cobie file is

var facilities = new List<Facility>();
var exchange = new IfcToCOBieLiteUkExchanger(_Model, facilities);
facilities = exchange.Convert();

foreach (var facilityType in facilities)
{
    var cobieFile = Path.ChangeExtension(OutputFile, ".cobielite.xls");
    string message = "";
    facilityType.WriteCobie(cobieFile, out message);
    break;
}

Any guidance would be appreciated