Python AddBlock() Help

I am trying to use the AddBlock() and get an error message.

Message: iteration over non-sequence of type Guid

and not sure what I am doing wrong. As far as I can see Srf is set the object I want.

def PartCreate():
    StPt= [0,0,0]
    EndPts=[[10.25,0,0],[20.125,0,0],[30.4375,0,0],[4.5,0,0]]
    Layer = 'Profile'
    Profile = rs.ObjectsByLayer(Layer)
    if rs.IsCurve(Profile):
        for i in EndPts:
            Srf= rs.ExtrudeCurveStraight(Profile,StPt,i)
            cap = rs.CapPlanarHoles(Srf)
            Name = str(i[0])
            block= rs.AddBlock(Srf,StPt,Name,True)

rs.AddBlock is looking for a list of object ids…

Yes isn’t the ExtrudeCurveStraight() returning a GUID with is what Srf should be set to.

Yeah looks like you can’t just have 1 object is the creation of a block. If I do this then it works.

objectlist = []
objectlist.append(Srf)
block = rs.AddBlock(objectlist,Stpt,Name,True)