Options dialog

From LabVIEW Wiki
Jump to: navigation, search

The Options dialog is located in the Tools menu and is accessible by clicking Tools->Options... (at the bottom of the Tools menu). Some of these options edit keys and values in the LabVIEW configuration file. This dialog provides the means to edit many development environment options organized into the following categories:

Adding to the Options Dialog

The Options dialog is locked and can't be added to easily, that is until DNatt helped us out. From this forum post DNatt gave us an overridden VI that replaces the Options dialog VI (PreferenceDialog.vi). Here is the VI and Instructions from that post for convenience and to ensure its availability:

  1. Backup the following VI: [LabVIEW 20xx]\resource\dialog\PreferencesDialog\PreferenceDialog.vi
  2. Replace that VI with the one attached to this post (LabVIEW 2014 or later).
  3. Create the following folder: [LabVIEW 20xx]\resource\dialog\PreferencesDialog\PreferencePages\User
  4. Create a new VI from the following template: [LabVIEW 20xx]\resource\dialog\PreferencesDialog\PreferencePages\pageTemplate.vit
  5. Save the new VI from step (4) into the User folder you created in step (3), making sure to save the VI with a prefPage_ prefix.
  6. Mass compile the PreferencesDialog folder.

Congratulations, you now have your own page in Tools->Options. A couple of things to keep in mind:

  • Change the window title of your prefPage VI, and that's what will appear in the page list in Tools > Options.
  • Don't change the connector pane of your prefPage VI.
  • Don't do anything with any of the 'TagSet' references in your prefPage VI. These are used by the C code, which you're bypassing. This includes removing the subVI call in the <Close Event> of the event structure.
  • Since you aren't using the 'TagSet' stuff at all, you'll need to implement your own handling of reading/writing configuration. Assuming your page uses the LabVIEW INI file to store configurations, you can do this with the VIs here: [LabVIEW 20xx]\resource\dialog\lvconfig.llb.
  • If you add multiple pages, they will be added to the end of the Tools-> Options list in alphabetical order based on prefPage VI file name.

Alrighty, have fun. Hopefully it's obvious that everything above is definitely *not* supported by NI through official channels.