Theres no such thing as line of a polygon
Try turning mayas show what i do command, ie turn echo all on.
Then take the curve drawing tool (ep or cp does not matter). Tell it to be linear (double click on the tool icon). insert 2 points with the tool and exit. Then look at what the script log tells you. , then extrude something along that line, Quite suppriseingly maya wirets the aswer for you.
Doing this exercise should help you immensely more than someone telling you the answer for the question asked.
Asme applies if you intend to manually build polygons with mel.