Hi there for anyone who is reading this topic. Really appricate for spending time on this with me.
I am a university student who is working on a final year project for sensor data and BIM linkage. The approach I planned is to make use of Excel live link function for the sensor data recording and using Dynamo to connect Revit model. The meaning of connecting Revit model is to make the data gatherred from Excel to be visualized (i.e. highlighting illuminance in color according to the readings of sensor) in the model. However, I have encountered difficuilities for the visualization part after having setup of Dynamo workflow for the importing Excel data to dynamo, the workflow setup is attached below. May I ask for assistance for the following workflow parts for the visualization. Thank you.
The main assistance I would like to ask is focusing on converting the improted data from excel and display it in Revit model (i.e. on a surface of a model elements) with set parameters, say having X lux illuminance will have a colored surface displaying on it.
P.s. please continue the discussion referring to the latest post without the challenge category
Revit has a specific functionality and API for similar use case, called AnalysisDisplay. With this API you can display overlays over your model, Revit will automatically create color ranges, legends for you. There are some nodes about this in Dynamo for the basic usage, under Revit->Analysis. If you want to dive deeper, here is the related API docs:
This display is like an overlay, you cannot modify data from Revit, but the data saved in the file, so it will be displayed if you just send the file to someone else. The data can be displayed in 3D and 2D, but this overlay is a 3D element, so other model elements can obscure it.
The official help is not very detailed about this topic, and you won’t find a lot of forum posts about this, so if you go this route expect some trial and error:
Filters. Assign the sensor data to a parameter of an element, and create/update filters with Dynamo, according to values. Be careful, on sensor update you will have to update the filter rules, not just the parameter values, as you can’t apply a color range to a filter. The plus of this it’s fully transparent, so the data is accessible for everything, as it’s just a parameter value. You can schedule it, tag it, etc…
Material manipulations. You cannot override materials by element, so for each sensors you need a separate material assigned to different elements, and change the parameters of the materials. Dynamo has some nodes for managing this. With this way you only have to update material properties on sensor updates. You can combine this workflow with the previous, so not just change the material but change the value of a parameter as well.
Room/space color fills. If you only have one sensor per room it can work. If you know the expected values of the sensors, you can just set up colors manually, than just update a parameter of the room. Downside of this workflow, that it’s only working on plan views, no 3D.
You can also set up color fills automatically, support for them were added recently in the API, added in Revit 2022. I cannot see any related nodes for this in Dynamo, so you have to use Python or C# for this:
This came to my mind first, it depends how you want to display the data, and how much you want to go down in the API. Good luck, this seems like a nice project.
I’m not quite sure how you want your final results to look. If you can map your values to Revit elements, then overriding the graphical properties according to your values should work (i.e. each element will have one color). If you want to go down that route I can help you with that.
The expected final result myself would like to see is to show the value I got from Excel (the sensor data) in from of color on elements surface in Revit model. Please accpet my apologize that I am not sure on the function of mapping since I am quite new to Dynamo, so I am not sure whether it is similar to your expected outcome. Also, there are some areas I would like to ask and confirm as well.
Q1: Since the value will be changing for everytime I run the workflow due to the updates of sensor reading, is it possible to set range for the color so that the color display on surface will change accordingly?
Q2: As you can see there are mainly 4 groups of readings (excluding time), is it possible to apply different color display towards each of these readings and show them all in the Revit model?
What I meant by mapping is that you create an instance parameter for your elements, so that you can store your imported values there (which is strictly speaking not necessary for the visualization). What does each data point mean currently? Does each one correspond to an element?
Q1: You can just set new overrides, each time you update - so yes, this should be possible.
Q2: If you want to show them all at once, then no, not with graphical overrides. You could create 4 views, each for a different group.
I would like to confirm what do you referring to for the data point. Does it mean the readings of UV, temperature, RH and illuminace as shown in the Dynamo workflow back to the beginning of the discussion? I would like to input these value with usage of the Ceiling category - New family “Air” for creation of surface to serve the function for showing and be visualizing in the model. Also, for Q2, I wonder if I could create 4 “Air” ceiling for coperating with different graphical overrides for groups of data to become a sort of solution as well.
If I understand correctly, the data you have in your workflow would correspond to one “air” element, and the separate values are for each time step? It would probably be best if you could show which element should visualize your data.
The two things you need to do is create a color range for you data and then override the graphic settings using that color. Here is an example:
The element I planned to visualize the sensor data is shown in the screen capture below, the selcted elements highlited. As mentioned, I am thinking if I create 4 same “air” ceilings with different levels so that I should be able to visualize each color of the data set, right? The existing challenge I am facing is how to make my data from excel to be visualized in the model, say overriding on the surface of the “air”, with the range of color and override as simliar as your example of workflows. Also another thing I am a bit confused on is how to connect the ports for each sensor data with “item” to the the color overriding workflow since I really don’t know how.
I guess it would be easiest if you create a parameter for ceilings (e.g. the sensor ID/name/…) and then export a list of element IDs + your parameter. Then you should be able to prepare your data in excel, so that you can override each element selected by ID.
I suggest you try to build the dynamo script for one element only at first. For that, you can just use a node that allows you to pick the element within the Revit model. Use that as an input for Element.OverrideInView and see if you can get the color range to work. For testing, you can just use a number slider as your sensor data input, so you don’t have to worry about reading your data for now. Once that works, you can expand the script.