RhinoScript syntax for _ExtrudeSrf using _ToBoundary option

Hi,

I’m writing my first RhinoScript and run into a problem, I created a planar closed surface and need to extrude them to a boundary. But my script fails when I try to pass the ObjectID of the boundary. Returning the message ‘No objects added to selection’

Thanks in advance for any replies,

I uploaded a working script, but below also pasted a code fragment. You just have to look at the cmd string.

1: Dim cmd : cmd = "_ExtrudeSrf _SelID " & surface1(0) & " _Enter _ToBoundary _SelID " & boundary
2: Call Rhino.Command(cmd)

StooledSill_A.rvb (5.6 KB)