Replacing duplicated families without losing instance data

Hi everyone, I am trying to solve what should be a pretty straightforward issue but ran into a snag.

Basically I am trying to create an automated way to replace duplicated families (in this case a weld symbol) in a project file with the original family type, without losing the instance parameter data associated with the duplicative family, which has been used in many different drafting views. So far I have been successful in reading and writing most of the instance parameter data, but I ran into an issue with reading and writing the actual weld symbol (Bevel, Fillet etc) which I believe is a nested family within the Weld Symbol family, and show up in the instance parameters as a drop down menu.

Any advice is much appreciated. I included a image of the RVT workspace and my very basic Dynamo script for reference


If they are nested, then you’ll most likely need to pass the Element I’d of the nested family as the parameter to set them. The main issue here will be that Element Ids won’t match between the two families. So, you’d probably need to iterate the nested annotations, check Thier names and get Ids, or something similar to that anyway.