Finding or helping to create a macro that will break all the selected artistic media


I would like to have a button that will let me break apart all the artistic media objects in selection (1 or many) and automatically deletes all the invisible leftover path curves from the breakup?

I wonder if there's one existing macro for this, or if you could help me create one?