C# - AddRhinoObject Attributes


#1

Hi,

As almost all the methods to add geometry to the document have the Attributes parameter, I would like to have this parameter also in the AddRhinoObject methods for custom objects into the class “Object Table” since no one have it:

  • AddRhinoObject(CustomBrepObject)
  • AddRhinoObject(CustomMeshObject)
  • AddRhinoObject(CustomPointObject)
  • AddRhinoObject(BrepObject, Brep)
  • AddRhinoObject(CurveObject, Curve)
  • AddRhinoObject(MeshObject, Mesh)
  • AddRhinoObject(PointObject, Point)

http://developer.rhino3d.com/api/RhinoCommon/html/Methods_T_Rhino_DocObjects_Tables_ObjectTable.htm

Thanks :slight_smile:


(Menno Deij - van Rijswijk) #2

The object has an Attributes property. Prior to adding the object to the document, you can make changes there. After adding it to the document, you can also make changes to it, but I think you also need to call obj.CommitChanges() to persist the changes in the document.


#3

Hi @menno,

I know you can do it in multiple ways. Calling RhinoDoc.ModifyAttributes, modifying the attributes of the object directly etc.

My point is I don’t know why isn’t exposed into the AddRhinoObject method

Regards,


(Menno Deij - van Rijswijk) #4

And my point is that I was giving an explanation :wink: