Hi @dale,
Thanks for your reply!
I have gave up on saving userdata under any geometry level. Instead, I am keeping them inside of Attribute of the RhinoObject.
Here is the problem that I encountered, and what I am trying to do:
I need to save a userdata for a solid Brep, and also have userdata for each subObject of this solid Brep (I tried to save with each surfaces, as I mentioned above, cannot save to BrepFace).
Because I need a solid Brep (need to check if the geometry is closed), I cannot separate each subObject as each individual Breps, and group them together. (I saw a post talking about this method)
With above strategy, I encountered an “EXCEPTION: System.Runtime.InteropServices.SEHException” when I try to do split amount solid Breps (all Breps are defined with above needs). the same split process works fine with the same solid Breps (normal solid Brep, without any userdata).
Here are related split code:
All related posts that I can find from this forum have exception messages or call stacks. I have tried the following setting, but still not getting any more message except the term “SEHException”. I wish I could provide more details for you, but cannot.
So here is my alternative:
I am saving all userdata under Attribute of the RhinoObject for the solid Brep’s info, and its subObjects’. I am using each geometry’s location info as its ID to save/get its userData from Attribute of the top RhinoObject.
(a side question, why don’t we have guid for Brep or BrepFace, or any geometry? is there a better way to track the geometry instead of its location info? I don’t trust the surfaceIndex, as the order might change for whatever reason)
I have a couple more questions in terms of enabling “undo” for userData saved in Attribute. I have looked at all posts about undo process, but still not be able to make it work. I will try to create a separate post about this.
Thanks again,
Mingbo