Cut-Fill Transition

Hey,

Im trying to create script that finds cut/transition point and separates assemblies, because in 3D model surface is corrupted. I have managed to find zero points and find stations along baselines but I cant add region to baseline. I get error “Sequence contains no matching element”

Any ideas? Or how I should work around it? Thanks.

TESTING DRAWING: https://drive.google.com/file/d/1mx-bYqP3iL3qG5LDRNvXpPajQXbhXJOI/view?usp=share_link
Script: Transition.dyn (60.1 KB)

Its probably because baselines are feature lines… Do you know any way to fix it?
EDIT: Exporting corridor feature line->making quick profile->exporting as LandXML->Importing and I have alignment and profile. Then I have normal baseline, create region, split them and set stations.