Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5749

Need a script that can do what SelBoundary is doing, in Py

$
0
0

@baciucristy wrote:

Ok, so I have some closed curves with texts in them, each curve with only 1 text. I need to rename the curves using the text and with rs.Command("_SelBoundary selid {} _Enter".format(str(obi))) line I manage to get the text of the obi curve, the problem is on 10-15 curves the script works with no problem, but I have around ~300 curves and sometimes it gets 2 different texts. This is the Script I am using:

obj = rs.AllObjects(select=False)

i = 1

#Creates the Groups
for obi in obj:
    
    if rs.ObjectType(obi) == 4:
        
        rs.UnselectAllObjects()
        
        crv.append(obi)
        rs.AddGroup(i)
        rs.AddObjectToGroup(obi, i)
        rs.Command("_SelBoundary selid {} _Enter".format(str(obi)))
        a = rs.SelectedObjects()
        rs.UnselectAllObjects()
        rs.AddObjectToGroup(a, i)
        i += 1

So, do you know any replacement for “SelBoundary” command?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5749

Trending Articles