algorithmic modeling for Rhino
Im working with C#, and im trying to get an InstanceObjects' Objects. When using a InstanceDefinition, I would use .GetObjects(), So I assume I should use .GetSubObjects() when working with InstanceObjects. However when I use .GetSubObjects, I am not able to access the Guid of the SubObjects. Does .GetObjects and .GetSubObjects not work the same way, just with different types? Or is the error I am getting not related to this.
For Reference, my code looks something like this:
Rhino.DocObject.RhinoObject[] myObjs;
myObjs = myInstanceObject.GetSubObjects();
int i = 0;
while(i < myObjs.Count())
{
Print(myObjs[i].Attributes.ObjectId.ToString());
i++;
}
And the error I am getting is this:
error: This object cannot be modified because it is controlled by a document. (line: 0)
Tags:
Welcome to
Grasshopper
Added by Parametric House 1 Comment 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2026 Created by Scott Davidson.
Powered by