Filter or get layers thickness above structure layer

Hi,

I’m trying to filter / get the sum thickness of the layers above structure layer in floor elements.

I’ve been able to get the layer types in one list an the thickness of layers in another. What i’m trying to do is filter out the structure layer thickness and below and collect the sum thickness of the layers above structure.

I know I want my lower list in the picture to sum up:
0 List = 100
1 List = 95
2 List = 0

Does someone got solution for this?

Best regards

JB

Hi,
probably there is a more elegant way, however for the moment I would use a Python script like this:

func = IN[0]
widths = IN[1]

noStruWidths = []

for i in range(len(func)):
	noStruWidths.append([])
	
	for j in range(len(func[i])):
	
		if func[i][j] != "Structure":
			noStruWidths[i].append(widths[i][j])
			
		else:
			break

OUT = noStruWidths
1 Like

Thank you very much!

This solve my task.
This also shows me how capable python scripts are. I better dig in that world.