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)