.. highlightlang:: us .. index:: FileList .. index:: y^file-list-window .. _file-list: The File List Window ==================== The File List Window shows open UniPlot and UniScript files in a tree view. For UniPlot files, the page names are listed. For script files, the list of functions can be displayed. .. image:: S:/uniplot-obj/images/project-en.* The tree view can display different recent file lists. User specified projects can be added to the File List Window. A project is a structure of file names and folders. Overview -------- * The File List Window can be docked on both sides of the main window. * The File List Window can be activated by a double-click on the page name of an open UniPlot document. * To access the File List Window, select File List on the View menu. * A branch can be expanded by a click on the + sign or a double-click on the name. For Script files (ic), the function names and bookmarks will be displayed in alphabetical order. A mouse click on the function name opens the script file and places the cursor on the function name. Bookmarks are comments starting with the characters "// @". Example:: // @This is a bookmark For data files (nc files), a click on the + sign opens the list of channel names. A double-click on a channel name opens the nc file in the Data Browser Window. * Up to four lists with recent files can be displayed: 1. UniPlot document files (ipw). 2. UniScript files (ic). If you do not use script files you can remove the element from the list (see :ref:`proj-config`). 3. Imported data files (nc). 4. All other files used with UniPlot, for example text files (txt), PDF documents (pdf), Image files (bmp, jpg, png), Data files (xls, mdf, ...). To remove file names from the list, select the item and press the delete key. .. _proj-config: Configuration ------------- In the Configuration dialog box, the different lists of files can be enabled or disabled. For the recent file lists, the maximum number of files can be specified. A right click in the column header or in the free space of the File List Window opens the Configuration dialog box. .. image:: S:/uniplot-obj/images/project-config-en.* .. index:: Project-Settings Projects -------- Projects are lists of files and folders. Projects can contain the following elements: * File names * Folders and sub-folders * Projects containing projects. A right click on a project opens the following context menu: .. image:: S:/uniplot-obj/images/project-pmenu-en.* **New Project** The project name can be specified in the following dialog box: .. image:: S:/uniplot-obj/images/project-new-en.* Closing the dialog box with the OK button creates a new empty project. **New Folder** A new folder can be specified in the following dialog box: .. image:: S:/uniplot-obj/images/projects-folder-en.* Any folder of a local or network drive can be selected. **Folder** Displays the folder path name. **Name (optional)** If the text box is empty, the folder name will be displayed in the File List Window. Otherwise the text typed in will be displayed. **Display Sub-Folders** Disabled: Only files will be displayed. Enabled (Default): Files and sub-folders will be displayed. **Search Filter** If no filter is specified or ``"*.*"`` is typed in, all files will be displayed. To display only certain files, a list of filters can be specified, for example ``"*.ipw;*.xls;*.xlsx;*.pdf;*.doc"``. **Exclude Filter** Filter to exclude files from the list. Example ``"*.bak;*.tmp"``. **Add Files** Opens a File-Open dialog box. Select one or more files to add to the project. **Copy** Copies one or more items (file names, project names or folder names) into the Windows clipboard. The selected items can be pasted into other projects. To select more than one item, hold down the :kbd:`Shift` key or the :kbd:`Ctrl` key while selecting an item. Only items in one branch can be selected. Ctrl+C can be used to copy instead of the menu. **Paste** Inserts elements from clipboard into the selected project. Hotkey: Ctrl+V. **Remove** To remove items, select the items and select Remove. **Export Project** Saves a project in a file. The file extension should be ``.uproj`` (for UniPlot-Project). **Import Project** Loads a project file with the extension ``*.uproj``. **Backup** Saves the project file :file:`uniplot.uproj` in the UniPlot User Directory (see :ref:`GetUserDirectory`). **Properties** Displays a dialog box to modify the project name and the element order. .. image:: S:/uniplot-obj/images/project-project-en.* **Help** Displays this help. **Configuration** Opens the Configuration dialog box. .. image:: S:/uniplot-obj/images/project-config-en.* File Commands ------------- A right click on a file name opens a context menu with the following commands: **Open** Save as a double-click on a file name. The executed function depends on the data file name extension: .. list-table:: :header-rows: 1 * - Ext - Description * - ``.ipw`` - Opens in UniPlot. * - ``.ic;.txt`` - Opens in a UniPlot-Editor. * - ``.xml`` - Opens in a UniPlot-Editor with syntax highlighting. * - ``.*`` - Will be executed over the shell. The application which is registered to handle a file extension will be started. The behavior can be modified, see :ref:`proj-programming`. .. us.bug ImportUI entsprechend Doku ändern. **Import Data** The command converts the file to an NC file. The command will be displayed if the file extension is known by UniPlot ``.dat .txt .asc .csv .xls .xlsx .mat .open``. **Open Folder** Opens the containing folder in the **Windows Explorer**. **Copy** Copies the file name to the clipboard. **Remove** Removes the selected file names from the list. The command will **not** delete the file from your hard drive. **Help** Displays this help. .. _proj-programming: Programming ----------- All functions for the File List can be found in the :file:`script\\projects` directory. Configuration of the Open command ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A double-click on a file (or the open command in the context menu) invokes a UniScript function with the following name:: def _proj_open_XXX(ssFilename, ssTopic) { } XXX is a placeholder for the file extension. Example: A double-click on the file :file:`d:\\test.png` will invoke the function ``_proj_open_png("d:\\test.png", "execute")`` *ssFilename* is the complete file name and *ssTopic* is the string "open" (if the open command is selected from the menu) or "execute" (if the file name is double-clicked). Example: Open a Windows batch file with UniPlot instead of executing the batch file. * Create a UniScript file (example: _proj_open_bat.ic) and save the file in the UniPlot autoload-folder. * copy the following function into the new file:: def _proj_open_bat(ssFilename, ssTopic) { EdCreate(ssFilename); } def _proj_open_cmd(ssFilename, ssTopic) { EdCreate(ssFilename, ssTopic); } and press F4 (:ref:`uniscript-save-execute`). A double-click on a batch file (bat, cmd) will invoke _proj_open_bat and open the file in an UniPlot editor. More examples can be found in :file:`script\\projects\\pro-dbl-click.ic`. :sub:`id-1344616`