There is no API function in VB or Weblink. Available in Toolkit only.
Perhaps you might try this:
Add all your surfaces to the SelectionBuffer with IpfcSelectionBuffer.AddSelection().
Then run a macro/mapkey with session.RunMacro().
You might have colors defined in your environment and these colors have a NAME, for example "r1", so this mapkey executed after adding surface selections to the selection buffer willassignthe color r1 to the surfaces: