Projects and Workspaces
The IDL Workbench makes use of two concepts that are new to IDL in version 7.0 but which may be familiar to you from other development tools: projects and workspaces.
Projects
A project in the context of the IDL Workbench is a directory that contains source code files and other resources (data, image files, documentation, etc.). While files included in a project need not be associated with each other, projects are especially useful as logical containers for related source code and resource files.
When the IDL Workbench starts for the first time in a new workspace, it automatically creates a project named Default in the workspace directory. You can use this project to store your own files, rename it, or delete it entirely. The Default project is only created when the IDL Workbench starts if the selected workspace contains no other projects.
The Project Explorer view allows you to view and manipulate the projects in your current workspace.
The IDL Workbench uses projects for three main purposes:
- Organization. Files included in projects appear in the Project Explorer view, and can be easily opened, edited, compiled, and run from the Workbench interface. Files included in a project can also take advantage of features like bookmarks and task markers.
- Path management. By default, the IDL Workbench modifies IDL's !PATH system variable to include project directories when projects are open, and to remove the directories from !PATH when the projects are closed. (You can, of course, choose to disable the automatic path management feature and control the value of !PATH explicitly.)
- Build management. If you regularly create IDL Save files from your source code, you can specify build properties for each project. Invoking the Build Project menu option then performs the actions you have specified and creates a Save file automatically.
Note that projects in the IDL Workbench are not the same as the IDL Projects feature that was present in versions of IDL prior to version 7.0.
By default, project directories are created under the current workspace directory, and files saved into a project are located here. You can choose, however, to locate your project directories in other locations, and to include files from disparate locations in a single project. See the Working with Projects tutorial for additional information.
Workspaces
A workspace is a directory that contains project directories, metadata about the contained projects, and information about the state of the IDL Workbench.
When the IDL Workbench starts, it prompts you for a workspace directory and loads the workspace you specify, or creates it if it does not exist:

By default, the workspace directory is named IDLWorkspace and is located in your home directory (as defined by the $HOME environment variable on UNIX-like platforms and in Documents and Settings\username on Windows platforms).
You can select any location and directory name for your workspace. The Workbench will remember your most recent selections in the dropdown list. (For a tip on managing the list of recent workspaces, see Editing the Recent Workspaces Listing.)
If you check the Use this as the default and do not ask again checkbox on the Workspace Launcher dialog, the IDL Workbench will start each time without prompting you. If you later want to change workspaces, do one of the following:
- Select Switch Workspace from the File menu. This will exit the IDL Workbench and restart it using the workspace you selected, with no prompting.
- Open the Startup and Shutdown preferences page and check the Prompt for workspace on startup checkbox. Then exit and restart the IDL Workbench and select a workspace in the Workspace Launcher dialog.
Each workspace "remembers" the arrangement of the IDL Workbench views and perspectives. You can have as many different workspaces as you like, but only one workspace can be loaded at once.
Do I Need to Use Projects?
While storing your resource files in an IDL Workbench project makes some things easier, it is not required. If you use the IDL Workbench mainly as an interface for executing IDL source code created in another environment, you may decide to avoid storing your code in projects.
You can execute code anywhere on IDL's path simply by entering the name of the routine at the IDL command line. You can open files in the IDL editor, compile and execute code, and set breakpoints and perform other debugging tasks without adding the file to a project.
If a file open in the IDL editor is not associated with a project, you will not be able to do the following things:
- Use the IDL Workbench Search dialog to locate text within the file. The Search dialog only inspects files located in the workspace. You can still search for text within the file using the Find/Replace dialog.
- Set Bookmarks.
- Define Tasks.
- Use the Outline view.
- Display compile errors in the Editor or the Problems view.