Creating roof panels

I am trying to create a “dynamic” Polycarbonat roof panel, which mean a roof panel which will change is size depending on parameters.

I tried to do so bay creating lines using python and passing “polysurface.byloft” between them.

But the final result wasn’t locking as I exapted in revit.

Any one have any suggestion how to do it?