Read Palette VI

Extracts data from a palette file (.mnu).

Use the Write Palette VI to write data to the palette file. After you edit the palette data, use the Refresh Palettes method to update the palettes programmatically.


icon

Inputs/Outputs

  • caprn.png application reference

    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.

  • cpath.png palette path

    palette path is the path, including the filename, of the palette file (.mnu). The filename must have a.mnu extension.

  • ci32.png palette type

    palette type determines whether the palette file (.mnu) contains data for the Controls palette or Functions palette.

    -2Controls
    -1Functions
  • cerrcodeclst.png error in (no error)

    error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

  • ipath.png duplicate palette path

    duplicate palette path is the path of the palette file (.mnu) from which the VI reads data.

  • icclst.png palette data

    palette data contains the data the VI reads from the palette file (.mnu).

  • istr.png display name

    display name is the name of the palette.

    If the palette view 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 view 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 view format is Text or Tree, display name appears as text to identify the palette.

  • iu16.png view format

    view format specifies the appearance of the palette items within the selected palette view.

    0Icons
    1Text
    2Icons and Text
  • ii16.png palette width

    palette width specifies how many palette items can fit in one palette row. palette width does not have a maximum value. If palette width is less than 0, the VI returns an error.

  • i1dcclst.png items

    items describes the items or subpalettes on the palette.

  • ipath.png item path

    item path is the path to the palette item or subpalette. item path returns an absolute path when the VI reads the palette file.

    If the item does not exist on your disk, the path returns appended with <<file not found>>. When the full path is not available, the path returns the file name appended with <<file not found>>. If the palette links to a directory, item path becomes Folder Name/dir.mnu. If dir.mnu does not exist on your disk, the path returns appended with <<file not found>>. If the palette item is an empty slot, item path is empty.

    If the palette contains functions or built-in LabVIEW controls and indicators, item path returns a generic message in the form BUILT_IN_FUNC_**_**_**_***. To prevent undefined behavior, do not manipulate the generic message the VI returns.

  • ipath.png library path

    library path (.lvlib) is the path of the library that contains the palette item. If the library item does not exist on your disk, the path returns appended with <<file not found>>.

  • ibool.png use default lvlib palette

    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.

  • istr.png short name

    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. If the item does not have an abbreviated name, the VI returns an empty string.

  • ibool.png place VI contents

    place VI contents places the contents of the VI on the block diagram if TRUE. If place VI contents is FALSE, this VI places only the VI icon on the block diagram.

  • ibool.png hide synchronized item

    hide synchronized item hides the synchronized item if TRUE. If you use the Edit Controls and Functions Palette Set or the Palette Editing VIs to create a palette file, then hide synchronized item returns FALSE unless synchronize with directory is TRUE.

  • ibool.png reserve spot for synch item

    reserve spot for synch item reserves a spot on the palette for the synchronized item.

    If you use the Edit Controls and Functions Palette Set or the Palette Editing VIs to create a palette file, then reserve spot for synch item returns FALSE unless synchronize with directory is TRUE.

  • ibool.png configure when placing VI contents

  • ipict.png 256 color icon

    256 color icon is the 8-bit color icon that represents the palette item or subpalette.

  • ipict.png B&W color icon

    B&W color icon is the black-and-white icon that represents the palette item or subpalette.

  • icclst.png help information

    help information determines the help file to which the Context Help window links.

  • istr.png help tag

    help tag contains the HTML filename or index keyword of the file you want to link to from the Context Help window.

  • ipath.png help file path

    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.

  • istr.png palette description

    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.

  • icclst.png synchronize information

    synchronize information contains the synchronization information for the palette file (.mnu).

  • ibool.png

    synchronize with directory indicates whether the palette file (.mnu) synchronizes with a directory.

  • ipath.png synchronize directory path

    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 returns an absolute path when this VI reads the palette file. This VI ignores synchronize directory path if synchronize with directory is FALSE.

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.

  • If you read from a palette set for a specific target without wiring the correct reference to the target using the application reference input, the paths the VI returns might be incorrect.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Application Control\Palette Editing API\Palette Editing API.lvproj