Thanks everyone. After changing the Cons 090 code from 4 to 6, everything worked correctly. I just had to then get the sequence right for the horizontal and the vertical layouts the user might draw.
Horizontal sequence:
(entmake
(list
'(000 . "LWPOLYLINE")
'(100 . "AcDbEntity")
'(100 . "AcDbPolyline")
'(090 . 6)
'(070 . 1)
(cons 010 (trans p 1 z)); Pt1
(cons 042 (car b))
(cons 010 pt5); Pt5: Midpoint on one side
(cons 042 (car b))
(cons 010 (trans (list (car q) (cadr p)) 1 z)); Pt4
(cons 042 (cadr b))
(cons 010 (trans q 1 z));Pt3
(cons 042 (car b))
(cons 010 pt6);Pt6: Midpoint on the other side
(cons 042 (car b))
(cons 010 (trans (list (car p) (cadr q)) 1 z));Pt2
(cons 042 (cadr b))
(cons 210 z)
(cons 48 scaledLtype);linetype scaling
)
Vertical Sequence:
(entmake
(list
'(000 . "LWPOLYLINE")
'(100 . "AcDbEntity")
'(100 . "AcDbPolyline")
'(090 . 6)
'(070 . 1)
(cons 010 (trans p 1 z)); Pt1
(cons 042 (car b))
(cons 010 (trans (list (car q) (cadr p)) 1 z)); Pt4
(cons 042 (cadr b))
(cons 010 pt6); Pt6: Midpoint on one side
(cons 042 (car b))
(cons 010 (trans q 1 z));Pt3
(cons 042 (car b))
(cons 010 (trans (list (car p) (cadr q)) 1 z));Pt2
(cons 042 (cadr b))
(cons 010 pt5);Pt5: Midpoint on the other side
(cons 042 (car b))
(cons 210 z)
(cons 48 scaledLtype);linetype scaling
)
I added it to my original code and it all works great now. Here is a sample image of the end results after the code update:
User draws a 20' x 15' rectangle horizontally and then vertically:
Thanks to everyone for your input!