Rhino.DocObjects.RhinoObject = RhinoDoc.ActiveDoc .Objects.Find(id)

There is a mistake with the doc.Objects.Find(id) function with the last version of grasshopper when you put it in a VB.NET component. Dim obj As Rhino.DocObjects.RhinoObject = RhinoDoc.ActiveDoc .Objects.Find(id)