This post is about productivity tools and setting up your IDE is definitely one of the most important things in programming (very tedious as well).
An old project
After two months working at home, I decided that my desktop computer needed a fresh installation. I’ve realized that after a couple of years using the computer, we install some many crap apps that you don’t notice until you see your performance hit the bottom line and struggle in trying to uninstall apps that don’t want to be uninstalled.
For a while ago, I developed a solution to set up the LabVIEW INI file using the available API in the palettes. It did two things: set up a configuration accordingly to a custom configuration file and reset (remove) these configurations.
For those who doesn’t know, since LV2015 (please, correct me in the comments if I am wrong) there are in “hidden gems” some VIs specifically for manipulating the LabVIEW INI configuration file, where your IDE stores all your custom configuration. I intend to approach in the near future the theme “hidden gems” (link for the post), but for now you should only know in advance that these VIs are mostly undocumented and not extensively tested by NI, id est, not supported by NI.
After doing that, I realized that there are much more configurations to set up after you fresh install a copy of LabVIEW, and then I decided to search in the forums and google what was already done by the community, and I didn’t found so many things, an expressive code was found in “Q” Alldredge’s Gitlab, which I found really interesting, but still not what I had in mind. NI’s page also didn’t provide me much information.
So I revived an old project that I had for setting my configuration (INI File) and did some tweaks to also backup some plugins used in development.
I did this modification because I decided to work with Virtual Machines (VM) for separating each LabVIEW Version. And how to ensure that the Environments have similar configurations? So I wrote this code to easy my life. That is what I think coding is, you always must have a clear purpose for writing.
Anyways, in this study of how I would do it, I found this page in LabVIEW Wiki, which tells a bit about the LabVIEW INI File, it is not very updated, but the main parameters are still there.
Here it is the functions of the tool, listed in the Tools Menu:
Features of the tool
The description of the actions in the menu are:
- Setup Custom Configuration – Creates a JSON file based on your selected options. You have also the option to apply this configuration.
- Apply Custom Configuration – Apply your configuration to LabVIEW IDE. It will attempt to restart LabVIEW.
- Reset Custom Configuration – Read your configuration file and reset to the IDE default. It will attempt to restart LabVIEW.
- Backup Files – This VI lets you choose what files and plugins you want to save in zip file.
- Restore Files from Backup – This VI lets you choose what files and plugins you want to restore to your machine from a backup zip file.
For now, I developed this app thinking in easy extention of the custom configuration file, so it is not so hard to remove or add a new parameter. As also for the plugins, it is very malleable. Currently, it is backing up three plugins, as shown in the picture:
As shown I am not so good at designing UI, as I didn’t spend much time in this. About the note. Yes, I decided to take the LabVIEW Default Data Directory approach, because:
- It is usually in User Documents Folder, so no issues with permissions and other things.
- It is easy to know what plugins are user inserted, and in LabVIEW Program Directory they are all mixed up.
Although, this approach could be a problem with people using two LV versions, and in fact, I had an issue with loading my current configuration in a LabVIEW 2015 version. For this I found this webpage in NI, where there is a tool for batch converting your LV code for previous versions using VI Server, and it solved my problems with some plugins that were saved in newer versions.
Some companies also adopt VIPM (.vipc) packages for distributing this configuration, but I found them not so flexible, and they do not contemplate the configuration file, unless, you hard copy the whole INI file, which is not my point.
Download the tool
So, that’s it. Below it is the Gitlab project page and the link for downloading the package.
The tool is accessible from Tools Menu >> FTools >> IDE Setup and Backup.
For now this app suffices my needs, depending on the feedback from you, I might work to evolve this app into a more robust application. If you find any bugs or any code improvements, also let me know. The project is open source and of course, is open for contributions.
Comment below if you find this tool useful. The developer will be happy about it. 😁
Enjoy, be safe, stay home.