Write Palette VI

Owning Palette: Palette Editing VIs

Requires: Base Development System

Writes palette data to a palette file (.mnu).

Caution  If you use this VI to edit palettes in the labview\menus directory, LabVIEW does not save the edits in a copy of the original palettes. After you edit the palettes, you cannot revert to the original palettes.

Details  

 Add to the block diagram  Find on the palette
application reference is a reference to a target. The default is the local computer. If the target is not the local computer, you must wire the application reference input to edit the Controls and Functions palette set.

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.
palette path is the path, including the filename, of the palette file (.mnu). The filename must have a.mnu extension.
palette type determines whether the palette file (.mnu) contains data for the Controls palette or Functions palette.

-1Functions
-2Controls
palette data contains the data this VI writes to the palette file (.mnu).
display name is the name of the palette. If the selected palette format is Category (Standard) or Category (Icons and Text) and you move the cursor over the palette icon, display name appears in a tip strip above the palette icon. If the selected palette format is Icons or Icons and Text and you move the cursor over the palette icon, display name appears at the top of the palette. If the selected palette format is Text or Tree, display name appears as text to identify the palette.
view format specifies the appearance of the palette items within the selected palette view. You can select Icons, Text, or Icons and Text.

0Icons
1Text
2Icons and Text
palette width specifies how many palette items can fit in one palette row. palette width must be greater than or equal to 0. If palette width is less than 0, the VI returns an error.
items describes the palette items or subpalettes on the palette.
item path is the path to the palette item or subpalette. item path accepts all type of paths. To create an empty slot on the palette, leave item path empty. If item path is empty, LabVIEW ignores any additional data in the items cluster.

An item is not added to the palette if the item does not exist on your disk. If you still want to add the item, first ensure that the path provided is valid, and then append <<file not found>> to the end of the item path.
library path (.lvlib) is the path of the library that contains the palette item.

If the library does not exist on your disk, the item is added as a non-library item. If you still want to add the library item, first ensure that the path provided is valid, and then append <<file not found>> to the end of the library path.
use default lvlib palette configures the VI to use the default project library menu. LabVIEW ignores this option unless library path (.lvlib) contains a valid path.
short name is the abbreviated name of the palette item or subpalette. If the selected view is Category (Icons and Text) or Icons and Text, short name appears below the palette item or subpalette.
place VI contents places the VI contents on the block diagram if TRUE. If place VI contents is FALSE, this VI places only the VI icon on the block diagram.
hide synchronized item hides the synchronized item if TRUE. hide synchronized item is valid only if you synchronize this palette with a directory using the synchronize with directory input.
reserve spot for synch item reserves a spot on the palette for the synchronized item. This input is valid only if you synchronize this palette with a directory using the synchronize with directory input.
256 color icon is the 8-bit color icon that signifies the palette item or subpalette.
B&W color icon is the black-and-white icon that signifies the palette item or subpalette.
help information determines the help file to which the Context Help window links.
help tag contains the HTML filename or index keyword of the file you want to link to from the Context Help window.
help file path contains the path or symbolic path to the file you want to link to from the Context Help window. help file path is either an HTML file or a compiled help file.
palette description contains the text that appears in the Context Help window if you move the cursor over the subpalette icon in the Controls or Functions palette or if you move the cursor over an open area of the subpalette.
synchronize information contains the synchronization information for the palette file (.mnu).
synchronize with directory indicates whether the palette file (.mnu) synchronizes with a directory.
synchronize directory path indicates the directory path to which LabVIEW synchronizes the palette file (.mnu). If a palette synchronizes with a directory, the items you add or delete from the directory automatically appear or disappear on the palette. synchronize directory path accepts any type of path when writing the palette file. This VI ignores synchronize directory path if synchronize with directory is FALSE.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
error out contains error information. This output provides standard error out functionality.
item path is the path to the palette item or subpalette. item path accepts all type of paths. To create an empty slot on the palette, leave item path empty. If item path is empty, LabVIEW ignores any additional data in the items cluster.

An item is not added to the palette if the item does not exist on your disk. If you still want to add the item, first ensure that the path provided is valid, and then append <<file not found>> to the end of the item path.
library path (.lvlib) is the path of the library that contains the palette item.

If the library does not exist on your disk, the item is added as a non-library item. If you still want to add the library item, first ensure that the path provided is valid, and then append <<file not found>> to the end of the library path.
items describes the palette items or subpalettes on the palette.
item path is the path to the palette item or subpalette. item path accepts all type of paths. To create an empty slot on the palette, leave item path empty. If item path is empty, LabVIEW ignores any additional data in the items cluster.

An item is not added to the palette if the item does not exist on your disk. If you still want to add the item, first ensure that the path provided is valid, and then append <<file not found>> to the end of the item path.
library path (.lvlib) is the path of the library that contains the palette item.

If the library does not exist on your disk, the item is added as a non-library item. If you still want to add the library item, first ensure that the path provided is valid, and then append <<file not found>> to the end of the library path.
use default lvlib palette configures the VI to use the default project library menu. LabVIEW ignores this option unless library path (.lvlib) contains a valid path.
short name is the abbreviated name of the palette item or subpalette. If the selected view is Category (Icons and Text) or Icons and Text, short name appears below the palette item or subpalette.
place VI contents places the VI contents on the block diagram if TRUE. If place VI contents is FALSE, this VI places only the VI icon on the block diagram.
hide synchronized item hides the synchronized item if TRUE. hide synchronized item is valid only if you synchronize this palette with a directory using the synchronize with directory input.
reserve spot for synch item reserves a spot on the palette for the synchronized item. This input is valid only if you synchronize this palette with a directory using the synchronize with directory input.

Write Palette Details

If you have not customized the data in the palette file, use the Read Palette VI to extract data to the palette file. After you edit the palette data, use the Refresh Palettes method to update the palettes programmatically.

Note  LabVIEW loads a separate palette set for each target. If you write to a palette set for a specific target without wiring the correct reference to the target using application reference, the path this VI stores in the palette file might be incorrect.