Hi Erick,
You can acheive this by using the addsweep and insertsweep script commands. The insertsweep adds an outer (parent) sweep to the existing sweep. The existing sweep becomes the inner/child sweep.Please let me know if you have any further questions.
Regards,
Amrita