I wrote a small script and am having trouble with the last part. It gets stuck at the end after the polyline conversion. I have to press the escape key to cancel and manually save and close. Not all of the files I process require a precision for spline conversion number and this is where it hangs up. I would like to add a command prompt to the end of the script to cancel out of the existing command but can't find a command line entry that works in a script.
script:
ZOOM
EXTENTS
SELECT
ALL
_SETBYLAYER
ALL
Y
Y
PEDIT
MULTIPLE
ALL
YES
4
ZOOM
EXTENTS
SAVE
CLOSE
snippet of command history up to the issue: