How to get Element.ID from list in List.FilterByBoolMask node with elements as lists? :O

Hello. I am new to dynamo so this might be a stupid question. I have a List.FilterbyBoolMask which have sorted some elements with “missing” parameters from the elements that have all the parameters filled out. In the “In” list i have the elements without parameters. What i need to do is get the element.ID from the different elements in the “In” and “Out” list, but i cant seem to get that to work. When i connect the list (Which contains alle elements of the whole category) in the new List.FilterByBoolMask i just get the cronological order and therefore not the 4 elements which have been sorted… I hope it makes sense. I would think that there could be a easy step to get the elements in the “In” and “Out” list shown just after the first List.FilterByBoolMask, maybe?

So to shorten my question. Is there a way to make a list of the element.IDs of the lists/elements in the first List.FilterByBoolMask, which i can use as the “list” in the second List.FilterByBoolMask node, so that it shows the correct sorted elements?

Hello and welcome to the forum :wink: not sure we have a node ootb element.id or just in a codeblock a.Id…not really sure if it what you are after

1 Like

is something like what you’re after?

It sure could be. What is it that the code block makes the script do? Cant seem to get that to work… :slight_smile:

that is the index of the parameter that you are looking for, in my case, it’s the Comment
its just a shorthand for List.GetitemAtItemIndex

edit: you need to check your list level

if not just type in the string name of the parameter on the parameterName

Hmm… i dont think that it will work that way in my script, because I have some shared parameters, that needs to be checked if they are filled out. Basically my problem is in the following, where the element.ID is NOT the sorted elements, but coming from the full All.Elements.of.Category. I have this List.Chop node that contains the correct elements and Ifc.GUIDs, but i need to add the Revit Element.ID to that. So somehow i need to go from a list to something that can add my element.ID in the top row if that makes sense :slight_smile:

Just like it is now, but the element.IDs are the “wrong” and not sorted ones coming cronologically from the beginning node of All.Elements.of.Category…

And the same is the problem with my “Out” list where i also just get the first element of the categories…

I believe my problem is that the List.FilterByBoolMask is in both instances connected to the All.Elements.of.Category in the beginning. I need something that can give me two new list from the first “In” and “Out” list containing the elements with and without parameters filled out… :slight_smile: Thank you so much for your help btw

if i understood correctly you were just looking for the parameters that are filled out or not and that’s what the List.FilterBooleanByMask is exactly doing, as what i see on your script the part where you are filtering it is already correct, the In will show you the elements that are filled out, Out is the unfilled one/ empty. Then you can do whatever on the data. The rest I don’t understand what’s happening.

When i have filtered the elements which have missing parameters in the “In” list and the elements which have the filled out parameters in the “Out” list i need to add the Element.ID to the front.

Just as i have done in the top row.

My problem is that the Element.IDs that are added in the top row is not the Element.IDs for the elements that the List.FilterByBoolMask node have sorted into the “In” and “Out” list.

The element.IDs are just cronologically added from the All.Elements.of.Category node that is all the way in the beginning. That is why the Element.ID from the “Out” list is the same as the one in the “In” list (347214)

I somehow need to get the “In” and “Out” list to be a list of elements instead of a “list of lists” if that makes sense :smiley:

Maybe this makes more sense. Now the two List.FilterByBoolMask is connected to the “In” and “Out” lists, but now i cant get the Element.ID

How to get the elements seperated so that I can use the Element.ID to get the different elements? :open_mouth:

There seems to be a lot of confusion around what it is you’re actually trying to do. Try setting up a simplified example where you can show us all of your inputs and the expected outcome you’re after. It sounds like you have multiple lists of elements and/or multiple filters. Your data won’t match if you’re using different logic in different places. If you’re wanting to sort one list to match the other then that’s a different question.

1 Like