|Caution Do not save your own VIs or other files in .llb files installed with LabVIEW in the vi.lib directory because LabVIEW uninstalls the .llb files, including any VIs and other files you saved in the .llb files, when you uninstall or reinstall. Save your VIs and controls in the user.lib directory to add them to the Functions and Controls palettes.|
The simplest method for adding VIs and controls to the Functions and Controls palettes is to save them in the labview\user.lib directory. When you restart LabVIEW, the User Libraries and User Controls palettes contain subpalettes for each directory, LLB, or palette file (.mnu) in labview\user.lib and icons for each file in labview\user.lib. After you add files to or remove files from specific directories, LabVIEW automatically updates the palettes when you restart LabVIEW.
Use the Edit Controls and Functions Palette Set dialog box to edit a palette set. Select Tools»Advanced»Edit Palette Set to display the Edit Controls and Functions Palette Set dialog box. LabVIEW stores Controls and Functions palette information in the labview\menus directory. The menus directory contains directories that correspond to each palette category.
|Note You can add a line to the preference file that sets the menusDir preference to an alternative path, one that is unique for each user preference file.|
If you edit the palettes, LabVIEW saves the edits to the labview\menus directory. LabVIEW saves the edits in a copy of the original palette. The protection of the original palettes ensures that you can experiment with the palettes without corrupting the original palettes. To revert to the original palettes, click the Restore to Default button on the Edit Controls and Functions Palette Set dialog box.
You also can use the Palette Editing VIs to create and edit palette sets programmatically. Use the Palette Editing VIs if you want to edit a large number of palettes, create new palettes, or validate the appearance of a palette after you edit it.
The Read Palette VI extracts palette data from a palette file (.mnu). The palette data output contains all information about the palette from the palette file. Select Controls or Functions from the palette type input to read data from the palette file for the Controls or Functions palette. Run the Read Palette VI a second time to read data for the second type of palette. Use the Read Palette VI if you want to use an existing palette as a template. You can read the data from an existing palette and customize the data to create a new palette.
Use the Write Palette VI to write palette data to a palette file. Use the items input in the palette data cluster to specify the information you want to display on the palette. The order of items in the items input defines the order of items on the palette. Select Controls or Functions from the palette type input to write data to the palette file for the Controls or Functions palette. Run the Write Palette VI a second time to write data for the second type of palette.
You can edit the palette set for a specific target by specifying the target in the application reference input of the Write Palette VI. Create a project with the target you want to reference. Use the Project:Projects property to obtain the target reference from the project. When you have the target reference, use the Application property to obtain the application reference.
|Caution If you use the Palette Editing VIs to edit palettes in the labview\menus directory, LabVIEW does not save the edits in a copy of the original palette. After you edit the original palettes, you cannot revert to the original palette.|
After you edit the palette set, use the Refresh Palettes method to update the palette set.
The .mnu files and .llb files contain one Controls palette and one Functions palette each. In addition, each file contains an icon for the Controls and Functions palettes. You must store each subpalette you create in a separate .mnu file.
For each VI or control, LabVIEW creates an icon on the palette. For each subdirectory, .mnu file, or .llb file, LabVIEW creates a subpalette on the palette.
If you use .NET or ActiveX controls on the front panel, select Tools»Import».NET Controls to Palette or ActiveX Controls to Palette to convert a set of .NET or ActiveX controls, respectively, to custom controls and add them to the Controls palette. LabVIEW saves the controls in the labview\menus\Controls\DotNet & ActiveX directory by default because all files in this directory automatically appear in the .NET & ActiveX palette.
After you install a module or toolkit in LabVIEW, a palette that represents that module or toolkit appears in a relevant category on the Functions palette. You can add module and toolkit subpalettes to the User Libraries and Favorites palettes to customize your palette view.
Select Tools»Options to customize LabVIEW. Use the Options dialog box to set options for front panels, block diagrams, paths, performance and disk issues, the alignment grid, palettes, undo, debugging tools, colors, fonts, printing, the History window, and other LabVIEW features.
Use the Category list at the left side of the Options dialog box to select among the different categories of options.
You do not have to edit options manually or know their exact format because the Options dialog box does it for you. LabVIEW stores options in a different location on each platform. However, the file format on each platform is similar to other configuration files. It begins with a LabVIEW section marker followed by the option name and the value, such as offscreenUpdates=True.
LabVIEW stores options in a labview.ini file in the labview directory.
If you want to use a different options file, specify the file in the shortcut you use to start LabVIEW. For example, to use an options file on your computer named lvrc instead of labview.ini, right-click the LabVIEW icon on the desktop and select Properties. Click the Shortcut tab and type labview -pref lvrc in the Target text box.
LabVIEW stores options in the LabVIEW Preferences text file at ~/Library/Preferences/LabVIEWxPreferences in your home directory, where x is the LabVIEW version number.
If you want to use a different options file, copy the LabVIEW Preferences file to the LabVIEW folder and make options changes in the Options dialog box. When you launch LabVIEW, it first looks for an options file in the LabVIEW folder. If it does not find the file there, it looks in the User Preferences folder. If it does not find the file there, it creates a new one in the User Preferences folder. LabVIEW writes all changes you make in the Options dialog box to the first LabVIEW Preferences file it finds.
LabVIEW stores options at /home/<username>/natinst/.config/LabVIEW-x/labview.conf, where x is the LabVIEW version number. If you change an option in the Options dialog box, LabVIEW writes the change to the /home/<username>/natinst/.config/LabVIEW-x/labview.conf file.
If you want to use a different options file, specify the file on the command line when you start LabVIEW. For example, to use a file named lvrc in the test directory instead of /home/<username>/natinst/.config/LabVIEW-x/labview.conf, type labview -pref /test/lvrc. LabVIEW writes all changes you make in the Options dialog box to the lvrc options file. When you specify an options file on the command line, LabVIEW still reads the /home/<username>/natinst/.config/LabVIEW-x/labview.conf file in the program directory, but the options file specified on the command line overrides conflicting entries in the program directory.