Move Elements into Worksets Based on System

Hi Everyone

i made on Dynamo Script to move elments based on the system into workset now its fine working properly but it takes long time to complete
(example 1200 items of Exhaust system were in air Condition workset which i moved into Ventilation layout it takes 12 seconds,
and same practice i repeat with diffrent number of items with same system Total 3600 items of exhaust were in 2400 was already in Ventilation and 1200 items were in Air Condition workset which i wanted to move only 1200 items which is in Air Condition workset when i applied this it takes 56 Seconds)
so my point is while applying the Script Dynamo should consider only those elements! which is not there in proper workset and other elements should be skipped is there a way to do

I had various Supply Air Ducts which were mistakenly placed in various worksets (Exhaust, Return, Air Condition, Workset1) and I wanted to place it back in the Supply workset.
Also, I had various Supply Air Ducts which were placed in the correct Supply workset.

What my graph does is it only tries to change the workset of the ducts which were not already present in the Supply workset.

Hope this helps.
Solution.dyn (30.6 KB)

1 Like