We use our customized Rhino.DocObjects.Custom.CustomMeshObject class for display purposes.
Rhino doesn’t save these as CustomMeshObjects (but simple Meshes), and it is OK after loading the file the plugin can convert them back to our CustomMeshObject type.
we do it like this:
doc.Objects.Replace(objRef, cust);
and it works fine.
But in case the CustomMesh object is in a Block definition, Rhino can not replace the mesh to our CustomMesh class, and it can be disturbing for the users.
Yes, I understand. Unfortunately, the custom object support in RhinoCommon isn’t where we want it to be. The solution is to implement custom objects in C++, or just attach user data to RhinoCommon objects and custom draw them with a conduit as needed.