after changing a component with
comp.selected = true
comp.Parent.ChangeComponentPreserveRefdes "< Selected Components >", NewName
the comp object is no longer valid, i.e. accessing it will generate an iCDB exception.
However it is crucial to keep attributes from block level, i.e. we need to save and restore them after component change.
Is there a reasonable way to get hold of that new object ?
the selection survives, i.e. Query(VDM_COMP,VD_SELECTED) returns the new object.
Comparing component ID makes another match.
Annotation attributes from the "old" components works fine, now.