Im working in C# and I am trying to get the Guid of objects in block, but whenever I do I get the following error:
- This object cannot be modified because it is controlled by a document. (line: 0)
My codes looks something like this:
if(RhinoDocument.Objects.Find(GUID[LoopCount_Prime]).Geometry.GetType().Name == “InstanceReferenceGeometry”)
{
var I_Ref = RhinoDocument.Objects.Find(GUID[LoopCount_Prime]) as InstanceObject;
Rhino.DocObjects.RhinoObject[] BlockObjs;
BlockObjs = I_Ref.GetSubObjects();
System.Guid New_Guid = BlockObjs[0].Id;
}
Any help would be appreciated!
Thanks,
Ryan