Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8550

Add Name attribute to a RhinoDoc object

$
0
0

@pgs wrote:

I am trying to add a name attribute to a rhinodoc object, similar to the ObjectName method in rhinoscript\object.py. However, CommitChanges returns False. How can I work around this?

Pål

doc = Rhino.RhinoDoc.New(None)
Rhino.RhinoDoc.ActiveDoc = doc

crv = Rhino.Geometry.ArcCurve()
guid = doc.Objects.AddCurve(crv)
obj = doc.Objects.FindId(guid)
obj.Attributes.Name = 'test'
obj.CommitChanges() #This returns False

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 8550

Trending Articles