Extracting room data for HAP

Hello,

I am trying to extract room data, including partition walls, exterior walls, area, height, and windows.

When I press “Export gbXML,” no file path is shown and no file is exported.

As a starting point, I tried using the Dynamo script below, but it still doesn’t display all the rooms in the model.

Try my code in the following post here and see if it returns the expected number of rooms

It’s working, I got all the rooms for every link, is there anyway to get the area and wall boundary?
Thank you

The GBXML export has a number of export methods which depend on the model state to function properly. Which one(s) have you attempted?

As a heads up, a successful GBXML export may still result in a junk HAP import, particularly if you are working with HAP v5.X (pre-v6 does not use the analytical surface method)

You can use OOTB nodes, however if the active model has been created with a structural template this may not be possible

I tried all if them, but nothing appears

Is there away to export them into an excel sheet or gbxml form?

I think the energy optimization and analysis tools within Revit and exporting to gbXML is going to be the most effective path

Saving room boundaries to excel is going to require some parsing into a text format (json, xml?) so that it can be interpreted in the future and converting to gbXML will require some effort

If you want to use rooms you will need to be in the file that has the rooms as the tool does not process rooms in links

There is a GREAT api method for generating rooms for all enclosed spaces worth calling out here: Revit API 2026 Documentation

the problem is gbXML export is not working

Is there any possibility that the export filepath UI is being buried in other windows/monitors? I haven’t seen any similar issues in the autodesk revit forum history.