Sharing and connecting to UNC paths
Sharing a folder as a UNC path
To share your tools or data across an LAN, you need to share the folder containing your toolbox or data so it can be accessed using a UNC path.
Sharing a folder across the LAN is a common practice. To share a folder, right-click the folder in the Catalog window, click Properties, click the Sharing tab, then choose Share this Folder.
Connecting to an existing UNC path
There are three basic ways to access toolboxes and data that are found in a shared folder:
- In the Catalog window, use the Connect To Folder tool .
- In ArcCatalog, type in the UNC path in the Location combo box, as shown below.
- Anytime you add data to a model or map document, or browse to data from a tool dialog box, the Connect To Folder tool is available on the Add Data dialog box.
Creating documents and models that use UNC paths
If you are creating a model or map document that is to be accessed by others on your LAN, data within the model or map document must also be accessible across the LAN. If the data resides on your computer, you have two basic methods for making your data accessible:
- In the ToolShare folder structure, place your data in the ToolData folder and use the Store relative path names option for tools and map documents. With this method, the data is stored relative to the model or map document. When a user on the LAN connects to the ToolShare folder, the data is found relative to the folder. (If a user wants a copy of your model or map document, he or she needs to copy the entire ToolShare folder to get a copy of the data.)
- Share the folder containing the data so it can be accessed using a UNC path, then ensure that all references to data in your model or map document use this UNC path.
The illustration below shows data in a model that is to be accessed by others on an LAN. The model resides in D:/MyTools and the data resides in E:/MyData. Since the model and data are on different disks, relative paths cannot be used. For the data to be found on the LAN, it must be referenced by a UNC path.
Like data in a model, layers in a shared map document must also use UNC paths for the data to be found on the LAN, as illustrated below.
When you are building your model or map document, you need to add data by browsing or connecting to your shared folder (\\cogitator\MyData) as opposed to the local folder (E:\MyData). This way, the UNC path is stored rather than an absolute path.
All you need to do is to share the folder containing the data as described above, then browse to this folder when adding data. To facilitate browsing, you can add a connection to the shared folder in the Catalog window by clicking the Connect To Folder tool and entering the UNC path to the shared folder (\\cogitator\MyData in this example). This will add another entry to your Catalog tree.
Now when you add data, you browse to this UNC path and the UNC path will be stored in the model or document.