Area Aware Families

Hi everyone,

I am fairly new to dynamo and have been tasked in my office to learn and create scripts to speed up our workflow.

This being my first post please go easy on me.

We use area plans for our zone drawings and include a parameter to define the ID of the given zone.
We also use data device families on the drawings that are placed between area boundaries (these use the same “Zone ID” parameter).

What i need to achieve is for the family to match the value of the area its within.
In other words I need a script that will fill out the families parameter value using the areas value.

So far i have managed to create a script that reads the information from each but i am lost on how to approach the next step.

Thanks in advance.

Sam

Hi Sam,

You need to relate the two lists by the values in your Zone ID field, not by their sequence.
An easy way of doing that is to look for the index of your family values in the area values list. You can then select the area for each family based on their index and copy the remaining data across.

Now this still relies on users filling the Zone IDs correctly. If you like a challenge, think about how to set the Zone ID with Dynamo in the first place.

Hope it helps

Thanks for the help TCJ.

After trial and research i now understand your instructions.

Although what i need to happen is for the parameter in the family (“Zone ID”) to receive its value from the value in the area (“Zone ID”) from coordinates.

A way that i can picture in head is if the families coordinate falls between an areas extents, using the area Zone ID value as the value for the families Zone ID.

Not sure if this clear enough in my explanation, im still learning programming language.

So far i have started a code seen below which i think needs building after the location nodes. Do you think this will be possible?

I do really appreciate the help here.

Sam

Hi Sam

These are the steps I believe you will need to implement:
1 - select the families and areas you want to work with
2 - create a geometrical representation of each object (maybe location points for families and solids for areas)
3 - test which families are inside which areas (with geometry intersect for instance)
4 - filter objects that do not intersect, intersect more than one area etc
5 - copy Zone ID and any other data across

For numbers 2 and 3 this may help. In the image objects (in my case rooms) are being fed from above and areas from below:

1 Like