Linked element ID, copy/monitor

Hi there,

I am trying to solve some issues associated with the copy/monitor process in Revit. For doing so, I need to copy the element ID of the linked elements in a family parameter of the corresponding instances in the model in order to have a direct relationship between both instances.

I have tried to identify the elements in the linked model with the elements in the working model trough coordinates but I get lost in the process since there are some possibilities that are not covered (for instance, the linked element has been moved).

Any idea how to solve this?