Can I change the {DATA} folder?

This article explains the operation of the {DATA} folder in current and previous OpticStudio releases, and the options to change folder locations. It also contains a patch to reset the {DATA} folder in OpticStudio version 17 and higher.

Authored By Don Dickinson

Downloads

Article Attachments

Introduction

The first time you launch OpticStudio, it automatically selects the {DATA} folder can copies all of the OpticStudio samples, configuration files, and license files to that folder. Be default, this folder is located in the user documents. If this is not desirable, then the location can be changed within OpticStudio.

This article walks through how you can change the {DATA} folder in any version of OpticStudio.  

How the {DATA} folder is selected

OpticStudio is designed to run with standard user privileges, which is a highly desirable feature under Windows in highly-managed IT environments. This means that you need Administrator privileges to install OpticStudio initially, but only standard user privileges to run it thereafter. To achieve this, all data files must be located in a folder that is guaranteed to have standard user read/write privileges. The operating system provides such a folder for any application that requests it. For an application named 'OpticStudio', and an English language version of the operating system, the default name is typically: 

C:\Users\{Username}\Documents\Zemax

Where {Username} is the name of the user account you are logged in with. System Administrators can choose different locations for the Documents folder (most typically to a network drive so that all users' datafiles are backed up). 

Changing folder locations

OpticStudio 16.5 and earlier

In these older releases, you cannot change the primary {Data} folder, as the {Data} folder is defined by the operating system of the computer OpticStudio is installed on (see the previous section of this article). However, you may change the locations of many of the individual folders, if desired.

Step 1: Open Setup...Project Preferences

 

Step 2: Click the "Folders" option. This should bring you to a screen where you see all of the folders for different types of files and data.

Step 3: Choose whatever locations you want by pressing the "..." button and browsing to the desired location. 

Note: 

  • You can also Save/Load this data, so sets of folders for specific projects or customers can be easily defined.
  • The "License" and "Configs" folders within the primary {DATA} folder cannot be moved. See the addendum at the end of this article for a list of all folders that can be changed. 
  • This does not move any files within the original folder to the new folder. You will have to move them manually. 

OpticStudio 17 and higher

In newer releases, we now offer the option to change the primary {DATA} folder. We also changes the ZOS-API, DLL, Extend and UDO folders to be subfolders of {DATA}, instead of being located in the OpticStudio installation folder (normally Program files\Zemax OpticStudio). This means you no longer need to have administrator rights to use or change any user-defined DLL files or extensions, and have more control over your primary {Data} folder. Additional details on this new functionality are covered in the Help files built in to OpticStudio.

Step 1: Open Setup...Project Preferences

 

Step 2: Click the Folders option, and you'll see all of the folders for different types of files and data:

Step 3: Choose whatever locations you want by pressing the "..." button and browsing to the desired location. Click "OK" to save the changes.

Notes on changing the primary {Data} folder:

  • You will need to restart OpticStudio for changes to take effect.
  • This does not move any existing subfolders or files within the original {Data} folder to the new one. It recopies the original Zemax data / sample files from C:\ProgramData\Zemax. If you want your orirginal files in the new folders, you will need to move those manually. This also includes the AutoSave, Configs, DLL, Extend, License, UDO, and ZOS-API folders within the primary {Data} folder, as those cannot be separately modified.
  • It does not change the Undo or Matlab data folders. You will need to change those separately.
  • You can also Save/Load this data, so sets of folders for specific projects or customers can be easily defined.

Notes on changing individual folders other than {Data}:

  • The AutoSave, Configs, DLL, Extend, License, UDO, and ZOS-API folders within the primary {Data} folder cannot be moved. They are required to be subfolders of {Data}. See the addendum at the end of this article for a list of all folders that can be changed. 
  • You can also Save/Load this data, so sets of folders for specific projects or customers can be easily defined.

Resetting the {DATA} folder if OpticStudio will not launch

Using Network shared drives or cloud storage drives like Google File Stream for {Data} can result in being unable to launch OpticStudio if offline, or if the drive letter / path changes. At this time, Google File Stream drives are not compatible with OpticStudio. We have created a registry patch file you can use to force OpticStudio to ask for a new {Data} folder the next time it is launched. This is only applicable to OpticStudio 17 and higher.

Follow the steps below to reset the folder.

Step 1: Ensure you have administrator rights in Windows

Step 2: CLick the Article Attachment link at the top of this page to download Reset_Data_Folder.zip. It will download a compressed / zipped folder. 

Step 3: Open the zip file and click the Reset_Data_Folder.REG file within.

Step 4: Click "YES" to any prompts asking if you are sure you want to apply it.

Step 5: Launch OpticStudio and it will prompt you to choose a different folder. Once selected, it will recopy all the sample files and catalogs that come with OpticStudio to the new location. Note that it will not move any existing or changed optical files or catalogs from the old location. 

Tip: Unless the default location is the issue, we recommend you select the folder that OpticStudio defaults to when installed, which is your Windows account's Documents\Zemax folder on your local C: drive. Typically, this looks like:

C:\Users\{Username}\Documents\Zemax

Step 6: If you are changing the {Data} folder via this method, you should also open Setup...Project Preferences...Folders and verify the other items on the list are subfolders of the new {Data} folder or otherwise valid locations. 
 Addendum: Default locations and purpose of DATA subfolders 

Here is a chart of what folders are within the master DATA folder, which can be modified, and what versions of OpticStudio they apply to. 

 

KA-01532

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.