Sorry I didn't try with 2014 or DWG files.
By the way, the main project that was hosting the linked file was also residing on a mapped network drive, I did test the behaviour of loading it through both its mapped and UNC paths. I didn't check for a local project linking a remote one though.
For reference, here's the code I used to test. Maybe there is something I'm doing that's different?
ModelPath projectFilePath = ModelPathUtils.ConvertUserVisiblePathToModelPath(@"Z:\Test\TestProject.rvt");
ModelPath oldLinkPath = ModelPathUtils.ConvertUserVisiblePathToModelPath(@"Z:\Test\Linked.rvt");
ModelPath newLinkPath = ModelPathUtils.ConvertUserVisiblePathToModelPath(@"\\XNAS\Public\Test\Linked.rvt");
TransmissionData transData = TransmissionData.ReadTransmissionData(projectFilePath);
List<ElementId> linkedIds = transData.GetAllExternalFileReferenceIds().ToList();
foreach(ElementId id in linkedIds)
{
ExternalFileReference extRef = transData.GetDesiredReferenceData(id);
ModelPath pathAbs = extRef.GetAbsolutePath();
if(pathAbs.Compare(oldLinkPath) == 0)
{
ElementId linkId = extRef.GetReferencingId();
transData.SetDesiredReferenceData(linkId, newLinkPath, PathType.Relative, true);
transData.IsTransmitted = true;
TransmissionData.WriteTransmissionData(projectFilePath, transData);
}
}