Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

rhino:rhinov5status_filefinding [2012/05/18]
dalelear
rhino:rhinov5status_filefinding [2012/05/23] (current)
dalelear
Line 1: Line 1:
 +====== Rhino 5.0 - Finding files ======
  
 +Rhino 5.0 attempts to automatically find files a linked block definition or worksession references when 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 and 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 Rhino 5.0 uses to find files, we will use the these terms.
 +  * **complete file name** This is 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** This is 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** This is 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 stating 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**  This is the complete file name of the .3dm file that is saved when you run the Rhino Save command. 
 +  * **active model directory** This is the complete directory name of the active model file name.
 +  * **parent file name** This is a complete file name that depends on the context of the file Rhino is trying to find.
 +    * If the file Rhino is trying to find is a model in a worksession, then the //parent file name// is the complete file name of the worksession .rws file.
 +    * If the file Rhino is trying to find is the 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 the file Rhino is trying to find is neither a model in a worksession nor a linked block definition, the 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 will save a model that has never been saved before or the directory where you last opened a model.  The location 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 Rhino 5.0 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.0 is looking for a model file used by a worksession or linked instance definition, it searches in the following order
 +  - saved complete file name.
 +  - saved relative file name relative to the parent file directory.
 +  - 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.
 +  - the short file name in the parent directory.
 +  - the short file name in the active model directory.
 +  - the short file name in the working directory.
 +  - Searches subdirectories of the complete directory.
 +  - Searches subdirectories of the parent directory.
 +  - Searches subdirectories of the active model directory.
 +
 +Back to [[rhinov5status_largemodels|Rhino 5.0 Large Model Support]]
 +
 +Back to [[rhinov5status|Rhino 5.0 Status]]