Revit DB export MongoDB

Revit DB export MongoDB

jpdalbora
Explorer Explorer
1,638 Views
4 Replies
Message 1 of 5

Revit DB export MongoDB

jpdalbora
Explorer
Explorer

I am currently looking for a way to export the Revit data out of the model and into a MongoDB to query and aggregate. Problem is the ODBC and/or RevitDB Link exports to a sql server which migrating to Mongo requires extra steps.

 

I found an ODBC driver for mongo and tried it but no luck using it as the ODBC export out of Revit.

 

Has anyone had success with Revit DB straight to MongoDB?

 

Also, my end goal for this is to leverage Forge or ACC (currently subscribing) to pull the data straight out of BIM360. If there is a way to do through one of those that would be awesome.

 

 

Thank you.

0 Likes
1,639 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk

You can easily export from Revit directly to MongoDB using the Revit API:

 

https://github.com/jeremytammik/FireRatingCloud

 

It is trivial, in fact. No need for any ODBC stuff or drivers, just use straight HTTP and DIY.

 

For the Forge and BIM360 aspects, however, I suggest you turn to the official Forge help channels:

 

https://forge.autodesk.com/en/support/get-help

 

That is a different side of things that has little to do with the Revit API.

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 5

Anonymous
Not applicable

Hi Jeremy, I've had no issues with accessing a MongoDB from Revit. But now I'm trying to access a CosmosDB, and get the following error:

diazs17_0-1623277375662.png

 

Any idea what may be the problem?

 

0 Likes
Message 4 of 5

jeremy_tammik
Alumni
Alumni

Your database connection may be requiring a specific version of a DLL, whereas some other component or Revit itself has already loaded another version, preventing the one you need from loading. Or some other variation of DLL hell. Quite a number of similar DLL loading problems have been discussed previously and often resolved in various ways here in the forum. Search here for 'load DLL' for example. One method (the most extreme) to disentangle the dependencies is to separate the process and use IPC to communicate:

 

https://thebuildingcoder.typepad.com/blog/2019/04/set-floor-level-and-use-ipc-for-disentanglement.ht...

 

People have recently discussed and used Fuslogvw to explore and resolve such issues:

 

https://thebuildingcoder.typepad.com/blog/2021/05/revitlookup-update-fuslogvw-and-override-joins.htm...

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 5 of 5

Anonymous
Not applicable

Many thanks Jeremy, I'll try the IPC approach. I'm also grateful to Kim Sivonen for sharing his example.

If I'm successful, I'll share my example using a WPF ui.

 

In my case, it could make sense to start a new process for database communication.

Although I still consider it a workaround to a problem that might possibly be solved in future releases of Revit.

 

0 Likes