Trouble uniquely identifying a Mesh

Recently, I’ve been trying to mount a system based on the conclusion @nathanletwory and I reached here, but the trouble I’m facing is related to this post.

Let’s put an example. I wan’t to modify data on InstanceBox1. InstanceBox1 has been generated within my parallel structure with the name “Instance_” + <InstanceId> using the ChangeQueue’s ApplyMeshInstanceChanges provided data, thus, the MeshInstance data.

If I generate a command that takes the selected objects from the screen, and, for example, wants to change some data associated to said objects within my parallel structure, the data available are not those from the ChangeQueue, but data from the RhinoDoc, the only source from which I can identify which objects are selected in the viewport. And, if the selected objects are instances, there seems to be no way to uniquely associate the results obtained from a ChangeQueue to the possible results obtained from a RhinoDoc. I thought of associating userdata to each instance, but said user data are seemingly not accessible from the ChangeQueue.

This means that from the RhinoDoc there is no way I can ascertain which parallel structure im referring to…

I thought of using a similar structure to what @nathanletwory did in RhinoCycles plugin:

/// <summary>
/// Record what meshinstanceid (objectid) points to what meshid
/// </summary>

private readonly Dictionary<uint, Tuple<Guid, int>> _rhObjectidMeshid = new
Dictionary<uint, Tuple<Guid, int>>();

But, the objectid contained within the meshinstanceID, though unique, is not directly the Guid of said object in structures.

What I mean is, is there a way to have available at the same time the id of the instance in RhinoDoc and the one provided from the ChangeQueue? This way i could build something similar to the dictionary that @nathanletwory did and solve this problem.