Use dynamo to change line types for a filled region

Hi all,

I have an idea for a script that I am trying to create but dont know where to start.

Background is that Revit has this annoying thing about it where when you create a filled region with a certain line type as the border, when you go back and edit the filled region, the line type doesnt default to what the current border line type is, it defaults to the last used which is so frustrating.

So I wanted to attempt to create a script that could change the line types of a filled region but dont know where to begin. Or if there is a script out there that does it, could they send me a link?

Thanks

This might help: Revit '22 Script No Longer Working? (Filled Region Lines)