Working Folder is another one of those concepts that is more complex than you would expect it to be. At it’s core, things are pretty simple, you map a local folder to a Vault folder. That way Vault clients know were to upload and download files to. The complexity comes from additional features that are built on or around this concept. I’ll try to detangle everything by listing the various features related to working folder and their related APIs.
If you right-click on a Vault folder and select Details, you will see the local folder that corresponds to that Vault folder. By default, the $ folder is mapped to a folder in your user settings. Also by default, a sub-folder is mapped based on the parent folders mapping.
You can override the default settings. So a sub-folder on disk may not necessarily correspond to the the parent folder on disk. In fact, you can even reverse the order so that the sub-folder in Vault is the parent file on disk.
These settings are stored in an XML file on your local computer. The easiest way to access that data is through the function Connection.WorkingFoldersManager.GetWorkingFolder(). It takes care of all the calculations for you and gives you the same path you see in the Folder Details dialog.
Enforced working folder
The Vault administrator can enforce a root working folder. This setting has the effect of overwriting any folder mappings set in the Folder Details window. An enforced working folder only gets applied to the root and all sub-folders are based off the root setting.
When an enforced working folder is in effect, the user is prevented from setting a working folder in the Vault client. However, the API function Connection.WorkingFoldersManager.SetWorkingFolder() still works, so be careful. The next time the user logs in through the Vault Explorer client, it will overwrite anything you changed with SetWorkingFolder.
Inventor project files
Inventor ignores any mappings you set through the Vault client. Instead it uses the .ipj file to map Vault folders to your local folders. So the GetWorkingFolder() won’t help you when working with Inventor. You need to either read the .ipj contents or use the Inventor API to figure out what the mappings are.
Since the .ipj file is critical for almost every Inventor operation, Vault has a special setting that you can use to locate the .ipj file. In the DocumentService there are two functions you can use to get at this data. GetEnforceInventorProjectFile() tells you if there is an .ipj file set to be used by the entire Vault. GetInventorProjectFileLocation() gives you the Vault path to the enforced .ipj file.