Exporting Models Data to DB in a Reliable and Useful Manner

Hi everyone, I am relatively new to the Revit and BIM modeling world.

I am a Junior Data Specialist working with Buildings and Civil Engineers, I’ve been assigned, as a task for a bigger project, the handling of data. I don’t model anything or do any data entry in Revit.

My objective is to extract the modeled data and especially all the useful informations related it (espcially our own Psets), store this data in a DB and render this data useful and reliable to be used in webapp and for building mainantence purposes.

I have reached a good understanding of the structure of a BIM model (I did my research and also read some stuff on BuildingSMARTS forums) and I’ve come to find out that the possible solutions to reach my end goal are :

  • Being heavily tied to Autodesk and Revit APIs, so paying a lot of money;
  • Revit’s own ODBC data exports and Revit DB Link “plugin”;
  • Try to make good use of a tool like the Ifc2SQL project and the IfcOpenShell project, both of which enable the parsing of IFCs files and try and bring the IfcClasses structure to db;

each one of these I’ve come to realise it’s not really a suitable solution, to my understanding (hence why I am making this post!), for these reasons:

  • Revit and Autodesk APIs, not only being expensive and tying to them, but also it feels like not a proper way to handle the data and have full control over it;
  • I’ve made several tests both with ODBC and Revit DB Link to DB exports and with ODBC it seems that all the psets (shared parameters) we create are exported to DB only for elements that are strictly part of a category, when an elements is put into a Family of elements (which to my understanding are the sub-categories of Categories), when exported, it doesnt have our Psets (only solution I’ve found is via DiRoots assigning to every family all the bigger Category Psets so that every underlying family inherits all Psets even on specific to the family ones, eg. I have the SpecialFireEquipment Category with its general Psets and in this category I have Fire-Exstinguishers and Hydrants, each should have its specific Psets, but when exporting data these do not appear so only solution I’ve got to work its to assign all specific properties to the category and leaving them blank when the element doesnt have them), further more if I am exporting for example just the file of the Architectural Discipline elements like windows and doors do not have psets while thing like floors, walls and spaces have them.
  • While Ifc2SQL and IfcOpenShell are great open-source tools to analyse BIM models data, they rely on an IFC file to be exported every time to update their “data source” (from what I’ve seen there is no solution to this), in particular Ifc2SQL creates a much more complex schema (closer to the real-deal) in the DB, making it really hard to track informations and still losing some of it, same for IfcOpenShell except you would create your own db schema based on what I’ve tried.

Sorry for the extremely long post, but I am left wondering, am I missing something? Do I need to tell the engineers and data entry teams to change some settings on Revit or to model and input data in a certain way? Is there a tool I am missing?

Thanks in advance to anyone that will take part in this conversation.

Have you ever looked at BIMserver?

Not perfect, but one such model<->db application you seem to be talking about. It’s one precedent to dig into.

You might want to look at what is happening over at Speckle, too.

I think the best option to come over all limitations is to develop a simple Revit plugin which exports the infromation you need and stroe them in json,xml,csv files or push them directly to a database according to your requirments.

You can look at the source code of Revit IFC Exporter and re-use some of the code.

If you can live with the fact that you need to IFC models or relay on already exported models by the design team, then you may consider another approach by converting IFC models to a graph database and control which elements and relatioships to be exprted. The database schema will be simple compared to IFC2SQL and alighned with the IFC official schema.

You can read about this approach here https://ifcwebserver.org/doc/ifc2gdb_eg-ice2017_ismail.pdf (published 2018)

1 Like

This, to my understanding, seems to be the most complete and plausible solution, I will read the paper as I always though that a graph db solution seemed the most appropriate, given the nature and structure of IFC data.

Now just need to figure out how to reliably get this data to the db.

Hello Marco, you can take a look at Qonic.com. It has a public API (Swagger UI) which allows you to access Revit an IFC data without the need of having a Revit licence.

1 Like