Hi,
I’ve only worked with Dynamo a couple of weeks, so I am at a basic level of knowledge.
Been looking around at the forum and I’ve found some helpful threads to get me started, great place to learn!
For my problem,
What I like to do is to collect all element of a category and apply a workset to them, but, I want to exclude the elements that are already given a specific workset.
So, basically I want to select all the pipes in the project, filter out and exclude the ones on a specific workset and apply a given workset to the remaining pipes.
So for my test I have 3 worksets, “V50-Modell” which are meant to be applied to pipes, “V57-Modell” which are meant to be applied to ducts and also a sketch-workset “Skiss”.
I would like to apply all the pipes to the workset “V50-Modell”. Though, I have a set of pipes that are applied to the “Skiss”-workset, which I want to be kept on that workset.
I’ve come up with the following so far:
The problem is, it is only changing the workset of 1 pipe segment and not all of the pipes. The marked pipe in the figure below is applied to the wanted workset, the rest of them remains the same.
In the figure abow, the two blue networks are ducts, the one on the left is on the “sketch” and the one on the right is on “V50-Modell”. The two red networks are pipes, the one on the left is on the “Sketch” workset and the one on the right is on “V57-Modell” (Which is supposed to be changed to “V50-Modell”.
I’m attaching the dynamo script. ApplyWorksetWithFilter.dyn (24.5 KB)
Any ideas on how to proceed? Is there a way to make an more efficient dynamo-script?
I’ve found a lot of helpful threads regarding filtering or applying workset, but nothing about combining them the way I’d like to do…
Thanks,