Issue with filtering elements by material

Elements return a list of materials. You’re flattening the materials list (3140) and then comparing that to the elements list (3078). Those lists do not match. You need to check the list of materials and filter for any matches first. That will give you all elements that contain your material. Then you can get the specific material and its properties (volume).

1 Like