CustomMeshObject vs file IO

implementing something using CustomMeshObject, I find it doesn’t survive file IO, but the trick of writing IDs and replacing objects while reading the file seems to work

however, since InstanceDefinitionTable.Add & ModifyGeometry only deal with GeometryBase, I don’t see how to accomplish the replacement there

the CustomMeshObject can be put into a block using the Block command, so I guess that must be working with some call other than what is exposed in rhinocommon

am I missing something, or is it just not going to be possible to have a CustomMeshObject that can be used in a block?

yeah, Rhino_DotNet from v5 has ModifyInstanceDefinitionGeometry which takes IRhinoObject[] but that (all instance-related apis, apparently) appears to have been removed in v6 Rhino_DotNet

and this seems like more than I would be comfortable doing (and apparently is not workable anyway, unless there is some rhinocommon way to create a definition with other than GeometryBase) inside ReadDocument:

I think custom objects should have read/write methods to override, and just work, without sketchy replacement going on in ReadDocument