1

I'm trying to export Revit data to an external database. What I'm looking for is to use RevitAPI to do the job of exporting. Though if there is a way to do so using Revit's own tools it'll be fine. As long as I can choose and modify the columns in exported tables.

Does anybody have any suggestions?

I've already tried "Revit > Export > ODBC", but this option only exports some default parameters and I can not modify the columns I want in my tables.

I'm also aware of Revit DB Link. It is for subscribed users only so that's not an option here.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

You can implement an Revit add-in to access the data you require from the Revit database and manipulate that into the form you require for export. For the actual connection to the external SQL database, you will have to use some additional library. For that, I would suggest searching the Internet for something like sql server .net api.

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17
  • Thank you for your response Jeremy. Is there any specific namespace or class to implement the add-in to access data or should I export data one by one using classes like FileteredElementCollector and access parameters individually? I've searched a lot (maybe not enough apparently!) for a more convenient approach sadly i haven't been able to find one. – Hamed Moghaddam May 27 '19 at 18:53
  • Filtered element collector is the one and only way to retrieve elements, so that is indeed the way to go. – Jeremy Tammik May 29 '19 at 05:30
  • damn...! At least I got some conclusions. Thank you very much for your help, Jeremy! – Hamed Moghaddam May 30 '19 at 20:43
  • no damn, not at all. it is easy, compact and efficient. lots of samples show how to access and export oodles of parameter data, cf. https://thebuildingcoder.typepad.com/blog/2018/05/getting-all-parameter-values.html – Jeremy Tammik Jun 01 '19 at 06:13
  • I guess I had a different idea in mind that I assumed was going to be exhausting. I'll definitely look into your blog (which is really helpful BTW) I'm sure I'll find what I'm looking for. I appreciate your help. – Hamed Moghaddam Jun 02 '19 at 12:10