Hi,
I’m having troubles to move an object to a new layer in C#. After searching a while, I noticed the following behavior : If I assign a new LayerIndex value to a BrepObject.Attributes, this value is not stored. See the following code :
_doc.Objects.Find(<A GUID>).Attributes.LayerIndex = <AN INTEGER, 21 for example>;
RhinoApp.WriteLine("Object on layer n°" + _doc.Objects.Find(<THE SAME GUID>).Attributes.LayerIndex.ToString());
So we set the LayerIndex to a fix value. But when asking back for it, the LayerIndex didn’t change. I precise that the layer with the tested index exists because the following code works for creating a brep on a specified layer :
_doc.Objects.AddBrep(myBrep, new ObjectAttributes() { LayerIndex = <AN INTEGER, 21 for example> };)
Any idea ?