Filter All Elements of Family Type selection by parameter

Hi,

I’m new to Dynamo and started my first graphs yesterday.

I have managed to get Dynamo to select walls by Type and set a parameter value (Unconnected Height) - my first successful routine.

Is there a way to filter a the selection by a parameter value ?

I would like to set up a routine to correct the Workset assignments in a Revit model - starting with a simple internal walls selection. I’d envisaged something like this:

Category=Walls ----> All Elements of Category —> Limit the selection to those walls where Type Parameter “Function”=“Interior” ---->Assign those elements to the Workset “04-Internal Partitions”.

 

I’d appreciate it if someone could provide a clue on how to filter the selection, particularly which node/s to use.

 

Many thanks

Martin

Take a look at this post. Should get you there. Link

Hello Martin, I think your logic is exact. The only problem that i faces trying to work with worksets through Dynamo is that Dynamo only retrieves some sort of numerical Id of the worksets. My way of working around this is:

-selecting a model element that is in the workset i’m interested in to retrieve the Id of this workset (circles in yellow in the image)

-I select and filter my elemets by parameter value (exactly as you said)

-I use the Id of the workset to set the parameter value of all the elements

 

there are probably more advances ways to do so but this is pretty simple and does the job. Hope it helps!

2 Likes

Firstly, apologies for not replying sooner - it’s been a crunch week and I’ve had no time to delve into Dynamo.

Thanks for the replies, I’ll read that other post Steven.

 

Mostafa, thanks for that - I can see the logic in that flow, I wasn’t sure on exactly how to use the BoolMask but that explains it. I hope to get some time this weekend to play around with the routine again.

 

I’ve canvased the office to get people to think about their Revit bottlenecks - particularly repetitive manual tasks so that we can identify the most productive areas to concentrate on.

 

Thanks again, I’ll update with progress later.

Martin

I am not sure what I am doing wrong, but I am not getting anything with this. Doesn’t change a single workset

@e1uvs I recommend creating a new post with an upload/image of the graph you are working with and elaborate more on what you’re trying to achieve with it

I am literally trying to find walls with the Interior function and change them to a certain workset. This script seems to be written to do that, but I must be missing something since nothing is changing in my model

Upload an image and/or the .dyn file. Without seeing the script you are using with previews/any errors visible, its not very likely that help can be provided.

Here’s the dynamo file that I have created. Worksets.dyn (7.6 KB)

Getting the Wall Function parameter value doesn’t produce a string like you are comparing your values to with. I’m not sure how/if what was posted above was working for the users. See this thread here on the Wall Function parameter values:

Alternatively, you can collect all walls with the Function “Interior” using the Collector.OfInteriorWalls node from the Rhythm package, as shown in the image below :slight_smile:

3 Likes

Fantastic! I knew I was missing something. That worked.