Envelopping Rooms Labels Seeking Advice on Extracting Level Elevation and Writing to Room Label Parameter

Hi everyone,

I’m currently working on a project in Dynamo where I need to extract the elevation of the levels associated with Rooms in Revit and write these values into a shared parameter. This parameter will then be displayed in the Room Label to show the room’s base elevation.

Here’s what I’m trying to achieve:

  • Extract the elevation of the Level associated with each Room.
  • Write the extracted elevation value into a shared parameter I’ve created for the Rooms.
  • Ensure that this shared parameter is correctly used in the Room Label to display the Room’s base elevation.

I’m looking for advice on the best way to set this up, particularly:

  • The most efficient way to extract the Level Elevation in Dynamo.
  • How to ensure the value is written correctly to the shared parameter.
  • Any tips on performance optimization or potential issues I should be aware of.

I’m using Dynamo with Revit [insert version here].

Thank you in advance for your help and insights!

So what have you tried so far?
Anything to show for? Bit easier than to give some advice.

Hi bvs 1982,

I have prepared the shared parameter in Revit, associated it with the Room, and included it in the Room Label. As a beginner, I tried to extract the level property from the Rooms and associate the level elevation, then send it to the shared parameter.

I meant. Do you have something in Dynamo you can share.

You have a few things wrong.
If no one beats me to it then
I will post an example tomorrow.

  1. Create a dictionary of the Level names and their associated elevations.
  2. Get the level parameter value (name) from the room.
  3. Get the level elevation from the dictionary.
  4. Write the elevation back to the custom parameter for that room.

Looking at OP screenshot I think going straight for Dictionaries is a bit too much (no offense).
Also you don’t need Dictionaries necessarily.

Here a example of what @Nick_Boyts suggests

Thanks

WOW, incredible… Thank you!
I try immediatelly to work with it!
I can’t see Element.level on Dynamo can you say me what version are you using?

You need to install a Package for that called Clockwork.

image

Tahnks again for the help. There is something that i am missing. Does it depend by my shared parameter?

You’re not providing a valid parameter name. You need to use quotes in a code block to make a string. Right now you have a variable with no input.
"RH01";

I see the same resulting “RH01”

RH01 is a shared parameter

The value of RHO1 has not been set - it is ‘null’. Notice the node has an input which you aren’t providing.

Try a string node instead, or wrap the value in quotes (“RH01”) if you want to use a code block.

Hi Jacob, thanks. Yes I see, forgive my low knowlege level of Dynamo, but can you explain me how ?

  1. Place a string node similar to how you placed any other node on canvas - search for String, but you can find it in your library under input.
  2. Write your parameter name in it.
  3. Wire it into your Element.SetParameterValueByName node as the input for `parameterName’.

You should review the Dynamo Primer - https://primer2.dynamobim.org/ - for the basics before you get started. Skip nothing until after the Revit section, even if an exercise feels irrelevant to your use as the concepts are what matter, not the outcomes (i.e. layout of sprinkler heads on a ceiling or desks in a room uses the same concepts as solar panels in a field).