Dear Gergő,
How do you achieve the desired result manually through the user interface?
Normally, programmatic approach is quite similar.
The procedure for you to explore this yourself is always the same:
Set up a simple minimal starting point situation manually through the user interface.
Explore the existing elements and their properties using RevitLookup, BipChecker, the element lister, and other, more intimate database exploration tools:
Make the desired modification, in this case adding the sloped glazing.
Analyse what changed.
Now you know what you need to do to achieve the desired result.
I hope this helps.
Cheers,
Jeremy