Is it possible to use Maxscript to extract the Custom Section of a Sweep Modifier ?

I have a batch of sweep objects I want to go through so that I can process them in some way.

The first step I need to accomplish is to go through my set of selected objects (each object is just a shape with a Sweep Modifier).

I want this script to do the following;

For each selected object;

1) Set the current layer to the layer of the currently worked on Selected Object.

2) Store the name of that currently worked on Selected Object.

3) Extract an Instance of the Custom Section that is of that Sweep Modifier and *name* that Instance as the stored name of the currently worked on Selected Object but with the Suffix "_SP".

4) Assign that Instanced Custom Section back to the currently worked on Selected Object.

Repeat for all other Selected Objects.

Please can someone help me write this - I am looking through the manuals but really not getting very far :(

Many thanks for any help you can give.