How to Filter only Element IDs with no Material

Dear friends
As a part of a quality check, I want to list the IDs of those elements which have not Material in the model. I extracted the Material and IDs of all elements and did some filtering as shown in the below picture. At the end, I used List.Transpose to show me the IDs which have no Material, but the list also contains the IDs which have Material too. Would you please tell me how I can filter only the IDs which have no Material (as highlighted in the pic) from the list ?
I am gonna send only the list of IDs which have no Material to Excel, not all the IDs.

Thank you so much in advance

Use RemoveIfNot node.

1 Like

Thanks @Kulkul for your response
I used it as shown in the pic but It doesn’t work and I do not exactly know I used it correctly or not.
Do you know where the problem is?
Thanks

Since your ids are at index [1] list.LastItem will do the job here:

1 Like

Thanks @Kulkul

The List.LastItem as shown in your pic gives all IDs, but what should I do If I want to only get the IDs which do not have any assigned Material as shown below?

Thanks

Actually, I don’t think you want to create the couples Material-ID in the first place… I think you should get the all the indices of the empty string (given that thos blank elements are indeed empty strings) in the original Material List (with the List.AllIndicesOf node), and then get the IDs at the corresponding indices in the ID list.

1 Like

Thanks @mellouze

I could get the indices of the empty string from the Material list using List.AllIndicesOf node, But could you please tell me how I can get the IDs at the corresponding indices in the ID list?

Thank you so much in advance

List.GetItemAtIndex :wink:

1 Like