This is one of those areas where lisp falls flat on it's face with C3D. The Structure's Surface property is expecting you to pass it a Surface object, not the name, but even the object won't be good enough if it's a TinSurface because, well, a TinSurface does not match the requirement of a Surface (it should, but it doesn't) so this fails, too.
You CAN globally assign the Surface to all of the Structures, however, via either the Prospector or PipeNetwork Editor. Select the structures, right-click the Reference Surface column header and select the desired surface name.