Select Elements using List

Hello All,

I am trying to create script highlighting elements based on workset. I have created script which collect all the workset and at the end drop down list allow me to select one or more workset. Now based on this like to do following but unable to find correct nodes or method.

  1. Like to select all elements from workset selected in dropdown list.
  2. Isolate or override color for the selected elements. If override then need option for reset override as well.

I am using Revit 2019.2 and Dynamo 2.0.2

Requested to help me on the above please.

Nitesh PanchalColor to Worksets.dyn (17.8 KB)

Before I launch into the solution, I just want to check that the Revit tool Worksharing Display: Worksets doesn’t already achieve what you need without Dynamo?
image

To answer your Dynamo question, once you have the list of desired worksets from the Archi-Lab Dropdown List Selector node, you can use == to compare against the workset of the elements. With this set to cross product you’ll get a list of workset matches per element which if any are true then the element belongs to one of the worksets. Use List.AllFalse (true will be elements that have no match whereas false will be an element that belongs to one of the worksets). Then List.FilterByBoolMask and use Element.OverrideColorInView or similar nodes to override. To reset overrides in a view, Clockwork has View.ResetElementOverrides

42328 Color to Worksets.dyn (28.7 KB)

Hope this helps,
Thomas

Hi Thomas,

Thank you for quick help.

I am aware of Worksharing Display but my QC team likes to check individual workset and as per my knowledge Revit tool just color all the elements together as per workset.

But thank you for correct script and it’s working fine with me. Just one more thing that how i can reset override done by this script.

Best Regards!
Nitesh Panchal

Hi Nitesh,

Glad it was of use. The Clockwork package has a node View.ResetElementOverrides that would reset the colour. The inputs are the element and the active view

Regards,
Thomas

Hey Thomas,

Thank you for help once again. Now i have made small change in script and instead of coloring the elements i am isolating the selected elements. But facing couple of issue after using the script with large project as following.

  1. After running the script with large project, it is capturing all the worksets but dropdown list selector is not refreshing and showing the old list.
  2. If the point 1 resolve then i like to run this script with dynamo player but i am unable to get drop down list in player.

I would appreciate your help on above couple of queries please.

Thank You!
Nitesh PanchalWorksets Isolate.dyn (29.0 KB)

Hi Nitesh,

Dynamo Player is not really my area as I don’t use it often, so I would suggest you ask a separate question which I see you’ve done already. The refresh issue should be solved by freezing, running and then unfreezing and running the graph again.

You’ve marked your comment as the solution, did you mean to do that?

Thomas