Adjust crop box height

Can anyone help with how I would adjust the height of a crop box. Some of the elevations created with the correct crop box height but then it failed for all the rest. I know I would have to get the crop box curves or bounding box. Then use a greater then or less then function to exclude the crop boxes already the right height. Then extract a y or z value to increase the height of the crop box and make sure all the lines connect after. Ill keep trying but my brain really struggles with it

I found this post from @JacobSmall but it dosnt seem to work. Unsure why :confused: Not sure if itd affect the widths to as I only want to adjust the heights.

Also struggling with the alternative script which works but it pulls all the elevations down to Level 0. Not quite sure how to add the Z or Y direction onto it so it sits at the correct level its supposed to be @john_pierson