As bert' mentioned, to cut a solid with the profile of a polyline you first need to create a solid from the 'closed' polyline, ie. extrude it deep enough to pass through your object to be cut. Then you simply SUBTRACT the new solid from the cutting object.
When doing this, make sure your cutting polyline is in the correct plane and you may need to give it a negative height value, you will see this after extrusion anyway and with a bit of practice you'll get the hang of it and from here you could contruct your lisp routine to perform the cuts automagically.
Rob's idea for cutting with a line is the best way to go, grab one of your lines points and change its 'z' value to give you another point to create a plane from the line to cut your object. The user will soon work out that a correct ucs is required when using this routine to achieve the correct result.
hth,
Mick.