HELP: How do you add verts along a curve into an array

Hi all,

I am wondering if anyone might be able to help me. I am trying to add verticies of a curve into an array.

I have created an IK Spline between a bunch of joints and now want to attach clusters to the verts on the spline. I could script it manually etc. but I am trying to learn MEL in the process so was wanting to do it in an array with a For Loop (I assume this is the way to do it). The curves verts may vary depending on what type of IKSpline i've created so not always known so I need a way to work out how many verts there are in the curve then add them into the array and then go through each one and add a cluster to it.

As a test I manage to add all my joints using ls -type joint into an array but I am finding it really hard to work out how I can add a sub object and the syntax is much more complicated now.

Any help would be really really great!!

Thanks
Nick.

Solved it!

It appears as though the script ships with Maya:

Program Files\Autodesk\Maya2009\scripts\others\clusterCurve.mel

cheers

N.