From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-18-2009 04:46 PM - edited 06-18-2009 04:46 PM
Hi All,
I have a sinking feeling that I'm going to be sweet out of luck on this one, but it's worth a shot...
We currently have two versioned folders for our company's reuse library (one in user.lib and one in instr.lib) so that things nicely appear on palettes without the need for 3rd party software etc. To complement this, today I was thinking that those VIT files we have could be even better placed in the Templates folder of LabVIEW so that when we go to File->New... we would be able to see our various company templates, etc....
However, when I tried this, the hidden folders etc that Subversion leaves also appear in the templates dialog so I end up seeing something simliar to this (there is only one VI, called "Wizard Dialog.vit" in the new templates folder right now):
From Templates
|-<Company Name>
| |-.svn
| | |-prop-base
| | | |-Wizard Dialog.vit.svn-base
| | |-text-base
| | | |-Wizard Dialog
| | |-tmp
| |-Wizard Dialog
|-DAQ
|-Frameworks
|-etc
Is there anyway to stop LabVIEW from showing the hidden Subversion files? (I tried turning on the setting to use _svn folders instead of .svn but got the same result)
Shaun
06-19-2009 02:19 AM
Shaun,
sadly, LabVIEW does not give a parameter to hide hidden folders and files in the file dialog. The file dialog itself is supplied by the OS and LV just makes a call to this API function. This dialog displays hidden elements (files and folders) with a transparent icon, whereas "normal" elements have opaque icons. Additionally, hidden elements are only displayed if your OS is configured to show hidden elements in the explorer.
SO either reconfigure the explorer to "Do not show hidden files and folders" and go for the standard browsing dialogs available in LV or you have to create your own call to the Windows API. But please note that i do not know if the API functions has a parameter "Show hidden elements". So this might not be a solution....
hope this helps,
Norbert
06-19-2009 06:56 AM
Hi Norbert,
Unfortunately we have our wires crossed - I am not talking about file dialogs - I know the settings there are set in Explorer. What I am talking about is the File->New... template chooser. When you add files to the LabVIEW x.x\Templates folder they appear as new template selections (alongside the built in offerings), a bit like VIs in user.lib appearing in the User Libraries palletes. However, UNLIKE user.lib, hidden folders put there by version control system (Subversion, in my case) also appear, incorrectly, as template selections, confusing people and leading to a sub-par solution (ie clicking on the xxx-base.vit "template" will not give the developer the right response as this is a subversion internal file).
Shaun
06-22-2009 07:36 PM
Hi Shaun,
Unfortunately, I believe the "New..." dialog finds all files within the templates folder and places them in the list of available templates. I do not believe there is currently an option to change this within LabVIEW. Do you require these .vit files to be in the same folder as the VIs?
06-23-2009 08:00 AM
Hi Will,
Thanks for the response - unfortunately the hidden files must be in the same folder (well, they're actually in a sub-folder) as they are how the source code control system functions. Subversion uses the contents of the special hidden folder (.svn or _svn, depending on your setup) to determine if a file has changed, etc.
In the main folder is simply a couple of VIT files for creating our standard documents (the goal is to have a heirarchy there to make reusing our own templates faster and simpler) but the New... Wizard seems to not be ignoring hidden/special folders like most other apps (and even the other LabVIEW functions such as Project, user.lib, instr.lib etc).
One theory I have lies with the List Folder function - this VI will also not respect hidden folders, returning them along side other folders (much to the annoyance of some of my customers).
Shaun
06-23-2009 08:34 AM
Any reason the template folders need to under SCC?
Our approach is to keep the LabVIEW folder only for products, and we regard New... Templates as products.
So in our SCC folders there is a folder called 'Templates' which we develop.
Using OpenG commander we copy the product into the appropriate folder.
Ton
06-23-2009 09:16 AM
Here's the background:
Some of the issues that we have had with our reusable elements in the past is
1. Ensuring that the various developers get the updates (ideally as automatic as possible)
2. Ensuring that the process for creating new reuse elements and updating existing is as streamlined as possible. In particular, an earlier process required that each template, etc be manually reviewed by a panel. Whilst this sounds good on paper, what was happening was that the review board would often get busy and things just wouldn't happen.
We therefore wanted to look at other options for allowing more creative freedom to the various engineers that could keep the reuse library alive. It was thought that a versioned location in user.lib, instr.lib and templates would allow any of the engineers (of which almost all are at least CLD) to contribute, whilst retaining change history etc. In addition, developers can choose to use something like CommitMonitor to automatically keep their reuse library up to date (helping address #1).
With the user.lib and instr.lib locations, this has been working like a charm and the Templates folder was the next target on the list for the expansion as some reuse elements are designed to be customized, and needed to be more of a complete VI than a Merge VI (e.g. a dialog box requires controls to be specifically located as well as block diagram code). It was at this point that I tried creating a versioned sub-fodler within Templates, found the issue, and came here.
06-24-2009 06:06 AM
One option might be to name the folders to start with an underscore instead.
That should be settable withing the tortoise svn options.
Ton
06-24-2009 08:53 AM
Hello again Ton,
I forgot to mention in my last post that considering reuse elements as products is a really wise idea, and I am almost certainly going to be putting some kind of logic into the system along that lines (probably involving a release branch or something like that). 🙂
As far as the _svn folders go, that was one of the first things I tried - thinking how some parts of LabVIEW are funny like that, but alas, the same kind of result was generated. I'm now pretty much certain is a flaw (if not a bug) with the way the list folder VIs function (which is what I'm presuming is behind the locked, New Template Wizard VIs) which means that I'm probably sweet out-of-luck. I'll probably resort to getting the other engineers to check out the templates to some other folder on their system instead and either manually finding the templates in explorer, or making our own template explorer utility.
Oh, and for the benifit of anyone reading this and thinking that one could simply ignore the other folders, because the New Template wizard tries to generate a preview for all of the templates, it ends up taking an absolute age to load up becuase the Subversion support files have filenames that make them look like VI templates.
Thanks for your wise words Ton - I appricite your help!
Shaun
06-24-2009 09:22 AM
Too bad.
But I am thinking of another workaround, you can remove all the SVN folders with a simple command.
Ton