Apply parameters from linked model rooms to elements in room

I am having trouble with a .dyn script. I am not sure if there needs to be a sequencing to control the Oder of the queries.

I wrote a script that searches a linked file for its rooms that are placed. It also searches to check that a selected category’s elements are within a room. I had assumed that if an element was within the room it would then acquire the desired parameter from the room and set it to the elements.

There seems to be a glitch in the flow. It appears as though the room parameter is selected and if an element is in a room a random (or possibly sequential) room parameter value is assigned to the element.

The result is that each element is assigned the a value to the parameter but it is not the value of the parameter of the room the element is in. I can post the script later if someone has an idea of how to support.

Cheers!

Many here likely have ideas. All of whom need your dataset and current graph. Otherwise we are talking too many variables to be of much help.

See if this helps…

Continuing the discussion from Apply parameters from linked model rooms to elements in room:

Here is the .dyn file that we are using. I am not sure if it is a model issue or a logic issue. We have built test models with multiple floors and rooms and the script works well. On some of our more advanced models we are getting results that list the wrong room parameter to the peice of equipment.

v5 SEA Room Location ID to Category Location ID.dyn (143.9 KB)

1 Like

It might be that there is a project north set in the revit file. You will notice in mine that I make use of the transform output from the linked instance elements node to correct for this.

Hope that helps,

Mark

Hi @mark.hughes3,
When you perform operations like this, your list management is extremely important.
In the image you posted, you test element presence in all rooms, then you filter out unplaced rooms, and set the parameters afterwards. So if there are unplaced rooms in the architects model, you end up with lists that are no longer equal and mess up the list structure.
So bottom line is, do the filtering before testing for presence :slightly_smiling_face:

1 Like

There is a project north oriented to a specific shared coordinate system. I will refer to your solution and get back to you.

Aah. I will look over the logic as well.

I find it helpful to extract bounding boxes so that I can see the virtual geometry in dynamo and compare where it’s meant to be to where it is :slight_smile: