So I have a bunch of elements that have a custom parameter assigned. I would to get all those items that have something filled out in those custom parameters. What would be the best way to go about that?
I was thinking that I could grab all the elements in the model and then filter them by if the parameter exists, and then again filter by whether there is something filled out or not. The first problem I ran into was under the revit>selection there was no select all elements, just all in categories, on levels ect… A work around would be to create node for each category combine the list and then flatten them, but that seems like a more work then should be required. Thanks.
Since you need every element use a 3D view with everything turned on. I will warn you this may take some time depending on the project size. I have done similar scrips which were garbing every element in view (about 10-15,000 elements) and it took about 10 minutes to run.
There is actually something called Element Parameter Filter in Revit API that can be used just for this purpose. Keep in mind that it’s a slow filter, and running it over all of the elements in a model, will cost you some time.
I am selecting a single element in a model to query it for Parameter Names. I then use that parameter and a sample value that a parameter must hold as filter criteria to return all elements that have that parameter and value combination. Now, this is category independent as you can see my filter returns a wall and a desk family since I typed “test” into these two elements Comments parameter.
I’ve used the KULKUL’s python to select all elements in the model. But it select all elements, even those that are not in use. I would like to select only the elements that are placed in the model.
I don’t really know how to do it. I’ve tried to clean the list but it doen’t work.
Which Dynamo version your using? Try to install latest Dynamo version 1.0. It works for me. Below there are some options how to get category. Good Luck!