Select specific family at specific level

hello everyone,
I want to select all of the specific family in a level. Please correct me.
18

thanks

your mask must have a booleen as input
true or fals

Get the family type from your elements from the AllElementsAtLevel node, then get the ID from the resulting family type. Then get the ID of the family type in your drop down. Ask if the ID from the drop down is the same as the ID of the instance types with an == node. The resulting true/false values are your mask.

1 Like

^ that, but I used Element IDs instead of names.

Good job. :slight_smile:

1 Like

thanks for your reply. But where i find list.equals node. And i am getting the following error.
Warning: Elements.Type operation failed.
The call is ambiguous between the following methods or properties: ‘Revit.Elements.ElementWrapper.Wrap(Autodesk.Revit.DB.CurtainSystem, bool)’ and 'Revit.Elements.ElementWrapper.Wrap(Autodesk.Revit.DB.FamilyInstance, bool)

thanks19

Element.name not Element.Type

1 Like

ok . where i will find list.equal node?

it can help you
https://dictionary.dynamobim.com/#/BuiltIn/Action/Equals
Equals in the wish list
if not:Capture

== should also work.

Visual representation of the solution by @JacobSmall :wink:

1 Like

totally not getting this:

I am using the sample project.
HVAC_E.rvt

using == i get 3 out of 41 devices on that level.

using list.equals i get… pretty much nothing? (see pic)

also tried Jacob’s Variant, still does not work.

I also tried getting the IDs and i tried using list intersect but it was always empty so i exported the ID lists to excel and they were different…

Hi @bogdan.petrescu63URX ,

The “All Elements at Level” node will give you instances.
You have to turn them into Types (“Element.ElementType” node) before you can compare them with other Types.

thank you for the suggestion but that didn’t work either.
for == it says Dereferencing a non pointer.

I think this approach was made by Jacob higher up.

you can see the results in the attached pic.
*should find 41 devices at 2. floor.

I managed to get it to find the 41 elements but i cannot post more than 1 pic.
I got it by using a “helper” text parameter - i used a specific value for that parameter at level 2 (select all devices in view and set the parameter) and that is how i got around the issue.

Not all elements have Element.Types (example: ModelCurve outputs null, which triggers the ‘dereferencing a non-pointer’ warning).

I recommend using Jacob’s method of Element.Id instead of Element.Name. ID is unique, Name is not (Too many “Standard” type names, for instance…)

Hi, I tried using the exact thing Jacob posted, still did not work.

When i saw IDs i was sure it will be a breeze. For some reason it did not work :frowning:

This may be a silly double-check, but worth verifying:

All Elements at Level uses the Reference Level as the collection method…is there any chance your other 38 fixtures are either using a non-relevant Reference Level or have lost their hosting? This could occur if the fixtures are copied in non-typical methods, if linked model associations are broken, etc…

A quick way to diagnose is to find the 3 fixtures that were properly collected, then go find a fixture that isn’t one of the 3 but should have shown up. Start querying the properties.

If either of these are the case, and for some reason you are not able to fix the model relationships, you may need to do an elevation-based filtering method instead.

1 Like

oh. my. God.

just checked and boy, was I in for a surprise: “just” those 3 sockets it found?
Turns out they were the only ones having as host the level i was looking at!!

The other ones (totalling 41! ) had as host cable tray, and were not constrained to level “2. floor”.

I take all “it does not work” words back, I am sorry! I am a Noob :frowning: i will lay low with the “does not work” and try harder to investigate…)

I am working on the sample revit project so i expected it all to be as i was imaginig it… WRONG!!!

managed to easily get all 44 using select model elements and boolean filter by category name :slight_smile:

can’t add more than 1 pic though.

Hi Bogdan,

To shorten your graphs you can also use the SelectByCateOrTypeAndLevel node.

1 Like