Message: iteration over non-sequence of type Guid

I am facing this iteration problem,i dont know why.Can you guys help me,please?I am giving the code below

import rhinoscriptsyntax as rs

def ExtrudeAlongultipleCurves():
    shapeld = rs.GetObject("Select curve to extrude", filter = 4,
    preselect = True)
    if not shapeld:return
    
    pathlds = rs.GetObject("Select the path curves", filter = 4)
    if not pathlds:return
    
    rs.EnableRedraw(False)
    
    for path in pathlds:
        rs.UnselectAllObjects()
        rs.SelectObject(shapeld)
        rs.Command('_ExtrudeCrvAlongCrv _selld' + str(path) + '')
        
    rs.EnableRedraw(True)
    
ExtrudeAlongultipleCurves()

You’re using GetObject, which only allows one object and returns a GUID. You need GetObjects, which returns a list of GUIDs.

1 Like

Thank you,sir.It worked.

Basically I want to use sweep1 instaed of ExtrudeCrvAlongCrv,so i changed the code.The problem was also solved.

But the next problem is i want to select a cuve and and a shape for sweep1 and want the same design for all the curves lying in that axis.How can I do that?In my code,it bulds one upon another.But I want to solve it with code.Thanks again

Your question is very hard to understand without pictures of what you have and what you want plus your code which is not achiving what you need it to.

1 Like

In the pictue i want to select the most left curve and the shape at its tail and do sweep1,then I want all the shapes besides it to follow in the same order.How can i do it by code by Sweep1?Only 1 curves occur and the other curves do not follow the order.

You need to find a way to select the other curves. either by mouseclick or by searching all objects in the current doc and try to determine how to detect similiar curves. Without specifying which curves rhino should sweep, you will not be able to sweep them.

1 Like