Google Analytics (Hidden)

Sunday, June 26, 2011

How to set up a connection between Autodesk Revit and Microsoft Access, via DBLink.

The following instructions describe how to set up a connection between Autodesk Revit and Microsoft Access, via DBLink. I used the hardware and software specified below, but these instructions might work for other specifications.

Hardware & Operating system:

Intel i5 , 4 gb RAM & Windows 7 Professional 64 bit

Software:
  • Revit Architecture 2012
  • Microsoft Access 2010 (* see note at the end of this page for other versions)
  • Autodesk Revit DBLink for 2012.
Downloads:
  • From the Subscription Center, from the list of Product Enhancements, download "Autodesk Revit DBLink for 2012", from this link:
http://subscription.autodesk.com/sp/servlet/download/index?siteID=11564774&id=14499814

Steps:
  • Once you have downloaded and installed DBLink, the next time you open Revit, there will be a new tool, named as "External Tools" > "Revit DBlink" in a tab named as "Add-Ins" on the ribbon.
  • Open a project, for example the "rac_basic_sample_project.rvt"
  • Do: Add-Ins > External Tools > Revit DB Link.
  • From the "Link Revit Model with Database" dialog box, from the ODBC tab, select "Select a new connection" and click on "Export".
  • From the "Select Data Source" dialog box, click on "New".
  • From the "Create Data Source" select "Microsoft Access driver" and click "Next.
  • From the "Create New Data Source" dialog box, provide a name for the connection, such as "My connection". Click "Next".
  • From the "Create New Data Source" dialog box, click "Next", and click "Finish" on the next dialog box.
  • From the "ODBC Microsoft Access Setup" dialog box, click on "Create".
  • In the "New Database" dialog box, type the name of a new database, such as "my sample project", and the path where you want the file to be created. It will be created as a ".mdb" file. Click OK.
  • There should be a confirmation message letting you know that the file was created successfully. Click OK.
  • Back into the "ODBC Microsoft Access Setup" dialog box , click OK.
  • Here is something strange: I always get an error message, saying that "The file data source was not saved". Just click OK to that message.
  • Back into the "Select Data Source" dialog box, browse or scroll to the right until you find your "My connection.dsn" file, and click OK.
  • Back into the "ODBC Microsoft Access Setup" dialog box, click OK (again!)
  • There will be a window on the screen, entitled "Link Revit Model with Database". It will begin linking... after a few seconds it will say "(Not responding) Don't panic, just wait... it is working... actually, you now have an Access file (my sample project.mdb) with all the data.
  • From the ribbon, click again on "External Tools > Revit DBLink".
  • From the "Link Revit model with database" dialog box, from the ODBC tab, select your connection, that should be now on the list, and click on "Edit and import".
  • After a few seconds, you will see a big window, named as "Edit Database before Import", from where you could see all the data of the model, in database format.










Comments
:

The process for setting up this connection definitely has some flaws. I did this using the latest and greatest in hardware and software, and I still got some strange errors, that should not have happened. Anyway, if you follow the steps described above, DBLink will be now up and running. Finally!

Note:
* If you don't have Microsoft Access 2010, but other previous versions, you need to download and install the proper drivers from Microsoft, either 32 or 64 bits, from this link:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13255

4 comments:

  1. In your "Create New Data Source" step above, Step ~6, You say that you're supposed to select the "Microsoft Access Database" and click "next." This option doesn't appear for me and I only have the "SQL Server" and the "SQL Server Native Client 11.0" options. Do you know why this would happen?

    ReplyDelete
  2. Do you have Microsoft Access installed?

    ReplyDelete
  3. Yes. 2010. 32-bit. I downloaded the AccessDatabaseEngine.exe file from your link above but I guess I'm not using it correctly. The various drivers still don't appear in the ODBC Data Source Administrator through Revit. I can find them when I access the ODBC through Windows but not through Revit. Argh!

    ReplyDelete
  4. Don't know what the problem is... Try creating a new thread at www.revitforum.org - Maybe someone else can tell you.

    ReplyDelete