Link: http://www.grasshopper3d.com/forum/topics/error-in-old-vb-code
If blnBake Then
'Bake Object
Dim mObj As New MRhinoBrepObject
mObj = doc.AddBrepObject(obj)
'Find obj attributes to change color
Dim att As New MRhinoObjectAttributes(mObj.Attributes())
att.SetColorSource(1) 'set color source to From Object
Dim rColor As New OnColor (color) 'make OnColor
att.m_color = rColor 'Set Object Color
'Modify the attributes
Dim objref As New MRhinoObjRef(mObj.Attributes.m_uuid)
doc.ModifyObjectAttributes(objref, att)
End If
No comments:
Post a Comment