Set Multiple Worksets to elements based on Scope Box Location

I am trying to apply worksets to elements based on their scope box location, but I would like the workset list to populate automatically

What’s the issue with this script? Can you demonstrate it?

Konrad,

Thank you very much for looking at this.

I would like that some elements (columns in this script) get into the
workset based on the location in their respective scope boxes, it works
when is limit it to a single scope box, it does not work for all available
scope boxes at once so that I needed to copy the script as many time as
scope boxes in the Revit file and I would prefer having only one script
that reads all scope boxes at once because we may need to create additional
scope boxes and it would be perfect if we do not need to keep tracking them.

The scrip set workset names based on available scope boxes, it also
separate columns based on their scope box location. The issue is that it
does not put everything together, only assign the right workset to the
three first columns (there are three scope boxes) the rest of the columns
get the name of the last scope box in the list. I also attached the dyn
file and a test Revit file in case it helps clarifying.

Thank you again,

Kamala

Columns to Workset Based on Scope Box Location.dyn (16.5 KB)

ScopeBoxes_Test.rvt (1.2 MB)

1 Like

Hi @kramos

There is a easy way of doing this. Why not just extract elements inside bounding box and assign scope box names. Have a look at this topic how to get elements inside bounding box.

1 Like

Hi Kalkul,

Thank you for your prompt replay. I am very new to Dynamo and may need a little more help from the Dynamo community. Below is my interpretation of your suggestion, but I think I am still missing something because some of the elements still do not get set to the right workset.
In addition, my knowledge of Python is extremely limitet, I would like to run it for specific elements (not all elements) and could not figure it out how to change the “Elements” to “Columns” because the category is Structural Columns with a space, no sure if it the Python script is reading a category.

Scope Boxes_All_Columns2.dyn (9.2 KB)
ScopeBoxes_Test.rvt (1.2 MB)

1 Like

@kramos You can play with lists at element.setparameter node or you need to match Elements list with values list. You could get the counts of element list and use list.cycle.

1 Like