Script eraseing modelspace objects

This post may help.