Automatic horizontals

Hello everyone!
I wish to develop a script that automatically raises horizontals to a specified height. The original file contains horizontals composed of multiple segments. When these segments are merged, their sequence is disrupted. However, I have managed to attach markers to the INDEX horizontals and raise them to the desired height.
The next step is to raise the INTER horizontals to the specified height, but I don’t know the principle by which to do this.
If anyone has any ideas or knowledge on how to solve this task, please help.
Thank you all!

Horizontal.3dm (598.4 KB) (11.2 KB)