additional remarks:
"Dim plineObj As AcadPolyline" must be changed to "Dim plineObj As AcadLWPolyline".