Using Revit - DB Link

Using Revit - DB Link
Greetings. I would like to share my experience in this bundle and get tips from users on its use.
I am not a great specialist in Revit, but in the Databases I understand very well. My findings are as follows:

  1. Uploading via DB Link is not complete; it is just a slice (part) of the Revit information model. However, the study of this, allows you to understand the work of Revit and facilitate the work with data.
  2. At this stage, we use DB Link to set custom parameters, calculate volumes and search for changes. Also now we are preparing a certain set for the accounting of details, but so far at the very beginning of the journey.
    To work with DB Link, I use a bunch of MS SQL (MSDE as a data warehouse) and MS Access for changes and adjustments (this bunch allows you to bypass the problem of 32 bit drivers for Access). I have created a special database (very simple and primitive in zip format attached, press F11 to access the tables), which allows you to quickly connect to MSDE and be able to quickly update when the data structure changes (for example, when adding new user parameters). The database consists of a connection module, the form in which MS SQL and the database are indicated, and 2 tables with a list of tables and queries (the latter is not used now). After setting the parameters in the form, a connection occurs and all the tables that are listed become available (the table should not have extra tables). Further, I process data using standard MS Access tools, for example, _Vse_Beton, _Vse_Sum requests (scripts will be attached and must be run on MS SQL (you must either remove user fields that are not in the database from the script or add them to Revit)) allows you to get the selected elements and in the future to obtain volumes of concrete (this is possible in Navisworks, however, after not complicated manipulations, you can obtain volumes of several models and more correctly). When creating queries, you need to imagine the Revit connection structure (you can get it through the MS Access diagram by uploading it to it or building the diagram in MS SQL), but it is not so difficult to figure it out (by this slice), at the same time you can understand where some of the glitches grow from. …

SQLQuery.txt (5.1 KB)

https://yadi.sk/d/dZC_umv-GJ0FEQ — download Access database

1 Like

Access1

3 Likes

@Andrey_Baranov Thanks for the post.
I am trying to use DB Link to update the structural framing size (ex: W8x15 to W10 x 13). But the import log shows an error that this parameter is read only, which is surprising because Dynamo let’s you change the type of a beam. Which means that Revit API gives write access to this parameter.
How has your experience been while trying to update your Revit model using Revit DB Link via changes made in Access?
Even though this tool has been around since 2010, there doesn’t seem to be much posts about it.

Good day. Yes, this option cannot be updated via Revit DB Link, only through Dynamo. In a similar situation, I enter the user parameter and it is easily updated, then it is possible to change this massively through Revit or Dynamo. I have a Dynamo script that allows me to select the parameter value I need and then (through Revit) you can update the category name or dimensions. A bit confusing but it works. The script is shown in one of my previous posts.

In addition to this (mass change of user parameters), for me the value of Revit DB Link is the ability to carry out calculations and control the values ​​(such as volume or area) of the necessary elements. It is worth a try.

1 Like

Suddenly a problem appeared and I want to talk about possible solutions. If a field appears that has a dot in the name, then the code (Access) hangs on the table that has such a field. This happened to me when IFC parameters appeared. You can remove a parameter or rename it in Microsoft SQL Server Management Studio. Select a table, select a parameter (field), delete or remove a point from the name, save the table. Then run the form again. Fill (change) such a field, you can only through SQL (Microsoft SQL Server Management Studio).

1 Like