Problem with extrusion

Good evening, I have developed a very simple script, which is to generate a polygon giving points by sliders and then select a line in Civil 3D, which performs an extrusion, does anyone know why only one side of the polygon is extruded?

Thanks

i guess it may need to have a surface to extrude to a solid?

Can you confirm the Geometry Scaling is set to Medium?

Yes it is, I finally solved it by creating a rectangle directly with the width and length. I still don’t understand why creating a polygon by points didn’t work…

Yes!