I am a little familiar with MEL, but gster123is the person you want to ask.
The way it would be coded is select the NURBS surface and get the script to:
get the dimensions of the selected surface
then ask it to do some math calculation relating to the space of the surface and the size of the spheres, also the gap required between and then each sphere can be created.
It would be a simple thing to do, but I dont know enough about MEL to show you quickly. Over to gster123, give him a PM and see if he can show you quickly
Chris (formerly R@nSiD)
When the power of love overcomes the love of power the world will truely know peace - Jimmy Hendrix
Winner SM VFX Challenge 1
3rd Place SM SteamPunk Challenge (May 2007)