Xrefs: Memorize\Apply material+modifiers assignment

As we know Max Xrefs are able to keep material+modifiers (after reloading xref geometry; the only Must is to keep initial material name). Is it possible (via script) to keep this assignment 'scheme' in some form
and apply it in another file (which has the same initial materials naming)?
Something similar to Lumion's feature:
Thanks you for attention