/// <summary>
        /// When the user updates the shared coordinates in the link model, Revit calls this
        /// method.  In this implementation, the updated local version of the link on the user's
        /// machine is uploaded (copied) back to the server location.
        /// </summary>
        public void OnLocalLinkSharedCoordinatesSaved(ExternalResourceReference changedReference)
        {
            string localLinkPath       = SampleExternalResourceDBServer.GetFullLinkCachedFilePath(changedReference);
            string fullServerPath      = SampleExternalResourceDBServer.GetFullServerLinkFilePath(changedReference);
            String serverDirectoryName = System.IO.Path.GetDirectoryName(fullServerPath);

            if (!System.IO.Directory.Exists(serverDirectoryName))
            {
                System.IO.Directory.CreateDirectory(serverDirectoryName);
            }
            System.IO.File.Copy(localLinkPath, fullServerPath, true); // Overwrite
        }
 /// <summary>
 /// This implementation simply retrieves the same local file name that the server
 /// uses when first copying the link document to the user's machine.
 /// </summary>
 public string GetLocalPathForOpen(ExternalResourceReference desiredReference)
 {
     return(SampleExternalResourceDBServer.GetFullLinkCachedFilePath(desiredReference));
 }