RhinoDocument.Objects.AddBrep(tmp);in visual Studio unknow?

hi why does RhinoDocument.Objects.AddBrep(tmp);in visual Studio unknow?


And

Guid id =   Rhino.DocObjects.Tables.ObjectTable.AddBrep(tmp); ```have errors ! too

but i found solution

 Guid guid = Rhino.RhinoDoc.ActiveDoc.Objects.AddBrep(brep);

Your first error happens because there is no class called RhinoDocument. There is RhinoDoc though.

Then your second error is because AddBrep is an instance method, so you need to call it on an instance of ObjectTable. As you found out the Objects property on a RhinoDoc instance will let you call the AddBrep method.

1 Like