Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

Merge select gbXML file elements

asked 2022-03-20 20:38:11 -0600

Ripcord's avatar

updated 2022-03-21 16:16:52 -0600

I have a use case where I need to merge two partially useful gbXML files into one useful gbXML file.

  1. gbXML A (File A) >> Good Openings but Bad Detailing,
  2. gbXML B (File B) >> No Openings but Good Detailing,
  3. gbXML C (File C) >> Good Openings and Good Detailing.

Using a text editor with the aid of the Spider gbXML Viewer I have 'successfully' merged openings from File A into File B to produce File C.

Is there a gbXML utility available that automates the merging of elements like openings or that could be used to develop an automated merging workflow?

Thanks for any direction the community may be able to provide.

-Jake Staub

edit retag flag offensive close merge delete

Comments

If the gbXML files are valid, one option is to use Ladybug Tools or Pollination plugins and create a script inside Grasshopper/Rhino.

Mostapha Roudsari's avatar Mostapha Roudsari  ( 2022-03-21 09:12:09 -0600 )edit

Thanks for the suggestion Mostapha.

Because the firm already runs Revit I am trying to avoid the overhead associated with running a second design environment.

Ripcord's avatar Ripcord  ( 2022-03-21 16:21:55 -0600 )edit

At the risk of sounding like a salesperson, have you tried the Pollination Revit plugin (https://www.pollination.cloud/revit-p... You can get a clean gbXML/OSM file from the Revit plugin directly without the need to do the extra stuff that you mentioned here.

Mostapha Roudsari's avatar Mostapha Roudsari  ( 2022-03-21 18:24:21 -0600 )edit

I tried the Pollination Revit 2021 plugin a little while back and it kept crashing Revit. I tried more recently and got squawks about an elapsed trial period. It's tough to tell what the annual plugin cost will be but at least one Pollination webpage shows $2400/year. That's nearly the annual cost of Revit!

After quite a bit of trial and error I developed a dependable Revit gbXML workflow based on mass families. The last step is Opening placement.

Ripcord's avatar Ripcord  ( 2022-03-21 20:23:06 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2022-03-28 21:08:38 -0600

Ripcord's avatar

updated 2022-05-30 14:33:47 -0600

Having found nothing readily available I developed a Python utility called gbxmlMerge and posted it to github for others that may be looking for a similar capability.

gbxmlMerge demonstrate how to manipulate gbXML files to merge Openings in one file with Surfaces in another to produce Surfaces with Openings. gbxmlMerge is based on xgbxml for gbXML handling and topologicpy for geometry handling. gbxmlMerge has been used on a production project and showed good results. Your mileage may vary but gbxmlMerge is a much better start than I had.

Incidentally, DesignBuilder includes a Merge Model Data From File capability that is similar to what gbxmlMerge tries to achieve. I haven't tried it but it sounds promising. OpenStudio advertises merge capability too but there isn't much in the way of control according to the application.

Also, for those looking to manipulate gbXML programmatically there is plenty written on the coding side about XML. The utilities are available in all kinds of flavors. Just need to pick an environment and start hacking. In that vein, XML Notepad was a nice resource in addition to a good text editor to build familiarity with the gbXML file structure. Spider Viewer was also very helpful.

-Jake

edit flag offensive delete link more

Comments

Also worth noting that there are XML extensions for VS Code.

MatthewSteen's avatar MatthewSteen  ( 2022-06-01 09:51:43 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

Stats

Asked: 2022-03-20 20:38:11 -0600

Seen: 291 times

Last updated: May 30 '22