Site Tools


Finding Linked Files

How Rhino Searches for Linked Blocks or Worksession References

Rhinoceros Versions 5 or later.

Rhinoceros versions 5 or later automatically attempts to find files a linked block definition or worksession references if they are not located in the expected location. The goal is to minimize the number of times you are asked to find files that have been moved.

Common cases that the automatic finding attempts to handle include:

  • A colleague sends you a model and a collection of auxiliary files. You put them on your computer in a folder with a different path than your colleague used.
  • You move your model from one computer to another using some variation on the theme of copy from computer A to storage device, then copy from storage device to computer B.
  • You change the way you arrange your models and auxiliary files.

File name terminology

To describe the process Rhinoceros uses to find files, we will use these terms.

  • Complete file name The name of the file that contains the storage device, the directories, and the file's name. The terms full path and absolute path mean the same thing. Here are two examples of complete file names.
    • C:\root\alpha\a1\aardvark1.3dm
    • \\fileserver\root\gamma\g1\goat2.3dm
  • Short file name The name of the file with no storage device or directory information prepended. A short file name does not contain any slash symbols ( '\' or '/' symbols). In the two examples above, the short files are:
    • aardvark1.3dm
    • goat2.3dm
  • Complete directory name The name of a directory that contains the storage device, and all intermediate directories, but not the short file name. In the two examples above, the complete directory names are:
    • C:\root\alpha\a1\
    • \\fileserver\root\gamma\g1\
  • Relative file name and starting directory The starting directory is a complete directory name and the relative file name describes how to find a file if you begin in the starting directory.
    • The first part of a relative file name is either a a '.\' or a '..\' Simply put, a '.\' means stay in the starting directory and a '..\' means move into the parent of the starting directory.
    • A complete file name can be constructed from a relative file name and a starting directory. Here is an example.
      • starting directory = C:\root\beta\
      • relative file name = ..\gamma\g2\goat2.3dm
      • complete file name = C:\root\gamma\g2\goat2.3dm (start in C:\root\beta\, go “up” to C:\root\, then go down to gamma\g2\, and then look for goat2.3dm.
  • Active model file name The complete file name of the .3dm file saved when you run the Rhino Save command.
  • Active model directory The complete directory name of the active model file name.
  • Parent file name A complete file name that depends on the context of the file Rhino is trying to find.
    • If Rhino is trying to find a file that is a model in a worksession, then the parent file name is the complete file name of the worksession .rws file.
    • If Rhino is trying to find is a file that contains the objects in a linked block definition, the parent file name is the name of the .3dm file that has the linked block definition.
    • If Rhino is trying to find a file that is neither a model in a worksession nor a linked block definition, the parent file name is the same as the active file name.
  • Working directory The working directory is a complete directory name. When your computer starts a program like Rhino it assigns a working directory. Usually, but not always, this is the directory where Rhino saves a model that has never been saved before or the directory where you last opened a model. The location of the working directory can change as you read and save files. A detailed understanding of the working directory is not important here.

Searching for files

When Rhinoceros saves the names of models used by worksessions and linked block definitions, it saves both the complete file name and the relative file name, relative to the parent file directory. When Rhino 5 is looking for a model file used by a worksession or linked instance definition, it searches in the following order:

  1. Saved complete file name.
  2. Saved relative file name relative to the parent file directory.
  3. A complete file name is made by replacing the storage device (drive letter) in the saved complete file name with the storage device (drive letter) in the working directory.
  4. The short file name in the parent directory.
  5. The short file name in the active model directory.
  6. The short file name in the working directory.
  7. Searches subdirectories of the complete directory.
  8. Searches subdirectories of the parent directory.
  9. Searches subdirectories of the active model directory.

Back to Rhinoceros Large Model Support

rhino/rhinov5status_filefinding.txt · Last modified: 2023/09/07 (external edit)