View Break Not Updating According to Given Values

I used the code below to update an interior elevation view. However, the view break updates according to the values shown in Image 1, whereas I want the view break to match the position shown in Image 2.

Below is the code I used to apply the view break.
If anyone has a solution or can review the code, please let me know where I’m making a mistake.
"
import clr

RevitNodes for Dynamo-Revit element conversion

clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)

RevitServices for document access and transaction management

clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

Revit API

clr.AddReference(“RevitAPI”)
from Autodesk.Revit.DB import *

Document reference

doc = DocumentManager.Instance.CurrentDBDocument

— INPUT —

Unwrap the view input from Dynamo

view = UnwrapElement(IN[0])

Define split parameters

Each split is defined by (startParam, endParam)

split_top_val = [0.25, 0.625]
split_bot_val = [0.5, 0.75]

— PROCESS —

Begin transaction

TransactionManager.Instance.EnsureInTransaction(doc)

try:
# Get crop region shape manager
crop_manager = view.GetCropRegionShapeManager()

# Remove any existing vertical splits
crop_manager.RemoveSplit()

# Apply new vertical splits
for start_param, end_param in zip(split_top_val, split_bot_val):
    # Always split region at index 0 (initial crop region)
    crop_manager.SplitRegionVertically(0, start_param, end_param)

result = "Splits applied successfully."

except Exception as e:
result = f"Error: {str(e)}"

End transaction

TransactionManager.Instance.TransactionTaskDone()

— OUTPUT —

OUT = (view, result)

"


This is actually the expected output based on your values.

SplitRegionVertically method
SplitRegionVertically(
	int regionIndex,
	double topPart,
	double bottomPart
)

regionIndex
Type: SystemInt32
Index of region to be split vertically (numbering starts with 0).

topPart
Type: SystemDouble
Relative portion of the original region to become the new top region (0 to 1).

bottomPart
Type: SystemDouble
Relative portion of the original region to become the new bottom region (0 to 1).

This is your issue. The split region set to 0 means you’ll always be splitting the first (bottom) region. Your first split is correct (gap grom 0.25 to 0.5) but then you split that section at its relative points of 0.625 to 0.75. Once you make a split, your parameter points become relative to the section you’re splitting. You need to take that into account as well as which section you need to index.