How To Retain File Name Property Value in Piping Component of referenced file

HI,

Is there a way to get file name property in piping component??, below wiki article shows how to get it,

But my question is about if a file referencing  other piping component file, is there a way to retain file name property information of referenced file,

Currently with below wiki steps a component is getting it's base file informatoin but it's get updated as soon as it it is referenced in to some other file.

https://communities.bentley.com/products/plant/w/plant_design_and_engineering__wiki/42255/how-to-show-active-model-file-name-to-piping-components-in-openplant-modeler

Regards,

Vivek