That's what I'm trying to do. My "environment variable" is defined in the .UCF file, and when I pass the string to mdlRefFile_reattach() as "REFHOME:fileName", I get a SUCCESS return code, but I don't get the display of the filename as "REFHOME:fileName", I just get the same thing I started with: "fileName". I can manually insert it using the reference file's "Settings" - I just can't seem to do it via native code...
Bruce