@Willem wrote:
Hi,
I found that after running rhinoscriptcontext.AddMaterialToObject(object_id) to add a material to an object, all it’s Usertexts are purged:
import rhinoscriptsyntax as rs id = rs.AddLine([0,0,0] , [1,1,1]) rs.SetUserText(id, 'foo', 'bar') print 'foo value : {}'.format(rs.GetUserText(id, 'foo')) rs.AddMaterialToObject(id) print 'foo value : {}'.format(rs.GetUserText(id, 'foo'))
printout:
foo value : bar
foo value : None
Posts: 1
Participants: 1