GetGuid_from_points


#1

Hi there,

I use the rhinoscriptsyntax command DivideCurve(objID, parameter, create_points=True, return_points = True) to divide a curve (objID). The problem that I face is that I cannot get the guid of the points created by the above-mentioned command. How do you think that this could be possible. I know that with GetPoints() command I could take the guid of each point, however, I would like to automate the process since I have many points.

Thanks a lot,

giorgos


#2

Hi Giorgos,

Would rs.AddPoint, solve the problem?

import rhinoscriptsyntax as rs

curve = rs.GetObject("select the curve",4)
pts = rs.DivideCurve(curve,5)
pts_Guid = []
for pt in pts:
    pt_Guid = rs.AddPoint(pt)
    pts_Guid.append(pt_Guid)
print pts_Guid

#3

Hi djordje,

Yes, your suggestion solved the problem. Thanks a lot.

Regards,

Giorgos