Thanks Mark,
The problem was with the vertex's. I found this out when I would (entget (entnext (entlast))), then AutoCAD would crash. All's I had to do was add (cons 70 32) to the vertext definition (I suppose to tell it that it had to be a 3d vertext). Works now.
Bill