Incorrect dimensions when exporting to gbXML


I’m working on a project where I’m using a gbXML from Revit to calculate inside area values in other software.
The problem I’m having is that the dimensions in the gbXML are different from the dimensions in Revit.
I have created a room in Revit which is 5000x5000mm, in the export model option I have set the boundary location at wall finish. When I open the gbXML in Rhino the sides of my room have slightly different values, there’s a difference of 3.28mm.

Does anybody know how I can get the correct values?

1 Like

This is most likely happening because of the tolerance and also using the conversation to feet and inches in Revit. Can you try to export the model as HBJSON and see if you still get the difference? That way we know if this is happening because of the Revit plugin or if there is something about the gbXML file format.

Hi @mostapha, when I export to HBJSON and set the dimensions in Rhino to metric the value is the same as in Revit, so no difference.

Thank you, @sanderr! If I understand your response correctly this issue only happens in the gbXML files. Can you upload the HBJSON and gbXML files here so we can have a look? I don’t know how much can be done on our end for the gbXML translation routine and we use the OpenStudio SDK for the translation. @chriswmackey knows more and should be able to help after checking the files.

Hi @mostapha, that is correct. Here are the files.

Something else I discoverd is when I use the Revit native gbXML export function the dimentions in the gbXML stay the same as in my Revit model. So this only happens when I use the Pollination plug-in.

TestProject01.hbjson (46.0 KB) (2.9 KB)

Hi @sanderr - This is a tolerance issue. You can see the values in the gbXML file.


@chriswmackey, I can recreate the error from Rhino if I try to save as the HBJSON file as a gbXML file as-is.

TestProject01_from_rhino.xml (36.7 KB)

But then if I change the units in Rhino to mm first, and then export to gbXML the output looks as expected.

TestProject01_from_rhino_mm.xml (36.7 KB)

Do we do the unit translation on our end or is it happening on the OpenStudio end? If it is on our end we probably need to double-check the translation and ensure it is accurate enough.

@sanderr, while we are waiting for this issue to be resolved can you tell me more about your workflow? Is it possible for you to use the HBJSON export instead to get the geometry and the areas?

Hey @mostapha ,

This is the function that governs all unit conversions that happen across Honeybee and Dragonfly:

It looks like the conversion factor for feet (0.305) could use some more decimal places if people want accuracy down to the millimeter. I guess I originally chose these values based on EnergyPlus’s native tolerance of 1 centimeter but I realize this is pretty coarse for other engines and applications.

I’ll add some more decimal places now.

1 Like

Thanks! @chriswmackey

@mostapha unfortunately I can’t use HBJSON. The software I’m using is for calculating energy performance for Dutch building regelations and can only import gbXML files. For now I’m trying to use gbXML files from Revit models, the energy performance program then calculates all the needed areas and exports them to a webapplication, which is used to make the final calculation. This has proven to be quite difficult because of the bad gbXML’s I was getting from Revit, but for now the Pollination plug-in solves this issue! (except for the small difference in millimeters)

1 Like

Hi @sanderr! Thank you for the detailed explanation. If the application has a standard input for surface areas and other entities that it subtracts from a gbXML model, we can develop an app to do the calculation using an HBJSON as the input. Glad to hear that the Revit plugin has resolved part of the issue.

And as @chriswmackey mentioned we should be able to solve the issue with the area for you so you can use the gbXML workflow as needed.

Hi @mostapha, That’s an interesting idea! how would that work? Maybe it’s something to consider if the gbXML still gives me problems.

I hope @chriswmackey 's solution solves my problem, thanks for the help!

It will be similar to this app.

It will take the HBJSON file and gives you the data that you need to get from it. You can also download them as a csv file.

It can work from the web, Rhino, or Revit.

Hey @sanderr ,

I have just merged in a fix with the more accurate conversion factor for feet:

So it will be included in the next update of the Revit plugin. In the meantime, you can get around the issue if you have both the Revit and Rhino plugin. All you have to do is export the model from Revit as a HBJSON, open it in the Rhino plugin, change the units IN RHINO to be millimeters, and then save the model as gbXML from the Rhino plugin. I realize it’s an extra step but you hopefully won’t have to wait too long for the next Revit plugin release.

Hi @chriswmackey, thank you! this workflow also works for me.

@mostapha, I’ll definitely look into using the Pollination cloud app, thanks for the help!

Hi @sanderr - I released a new version of the Revit plugin (2.139.1) that should include this fix. Can you give it a try and let me know if that resolves the issue on your end?

Hey @mostapha .

I’m not sure if the fix is actually there since Github Actions have been broken for most of the last 2 days and I only just got the core libraries to be compatible with one another across their releases a few minutes ago. So you might just want to do another release at the end of today just to be sure.

Thank you, @chriswmackey for the update! I should have checked with you before posting it here. :see_no_evil: Then it should be fixed in the next upcoming release. We have a few reasons to do that early next week.

Hi @mostapha, thank you for letting me know!
I can wait until next week, no problem