Locating devices families to the closest control panel

Hello,

I am currently trying to set up a script where I can assign the name of a panel family to an existing parameter in multiple device families, based on their proximity to multiple panel families. Each panel can reach a max of 16 devices which means if there are more than one panel on a floor then the list needs to analyze the distance of the devices compare it and decide which one is closer to which panel. Also, it can not exceed 500 feet and needs to chose the panel on the same level.
Here is what I have done so far:

  1. Located the device families in space.

  2. Found the distance of each device to each panel (3 lists) and further filtered by level

  3. Filtered List by removing all devices that were over 500 feet.

I am not sure how I can take this list and use it to assign the control panel name (list) to a max of 16 devices (items in list). Please help.

Thank You

Hi Shahzada, welcome

Please review How to get help on the Dynamo Forums

The image is too low res and cut off. In Dynamo please zoom in so the Graph is readable and take a snapshot of the workspace using the tool in the top right corner - this will capture everything

If you are able to attach the Dynamo file and a minimal example Revit file that would help or otherwise a link to online storage like dropbox, OneDrive, Google Drive, etc.

1 Like

Hey MIke,


Thanks for the tip. Please find the updated image attached. Unfortunately I can not upload the file anywhere at this time cause I am on a work laptop.
Thanks again for the help!

I still can’t see the titles of the nodes. Zoom in even closer

Sorry about that. The name of the nodes were turned off. Please see attached. I believe you can download the image and zoom in and the resolution should hold up.