Jump to content

"smart" virtual folders in the LV project window


Recommended Posts

I saw many discussion about how to organise the VIs (and other type of file) in the lvproj window.

Now we have the auto-populating folder, the snap-shot folder, the virtual folder and the dependencies (am I forgetting another something ?), everyone has his way of using these options.

Until recently I was mostly using auto-populating folders in order to have the same hierarchy in my lvproj and in the windows explorer but I am now using more and more the virtual folders, they're cool but they're cool enough...

What I'd like to have a "smart folder" for which I could define a set of conditions to meet for a file to appear in it.

Conditions could be :

- an extension,

- a string token in the name of the VI,

- a date range for the date of last modification,

- a range of file size,

- does VI has documentation,

- who made the last modification,

- etc... to be continued...

Of course a file could appear in several "smart folders"... which is unfortunately not the case now for virtual folders.

:shifty: Mac users certainly use "smart folders" in Mac OS X.. well that what I'd like in the lvproj, anyone else's interested ?

Link to post
Share on other sites

To implement this feature, I think your request first needs to go to the makers of the various operating systems. An app like LabVIEW would need the ability to lock down sections of the disk and prevent all other apps, including the Explorer/Finder/command line/KDE/Gnome itself, from modifying those directories OR you're going to need a much much much more efficient mechanism for notifying an application when files change in directories that the app registers itself as caring about. The auto-populate folders that exist today are pretty much bleeding edge of what we felt we could achieve with the existing operating systems.

Link to post
Share on other sites

QUOTE (Aristos Queue @ Mar 7 2009, 04:23 PM)

To implement this feature, I think your request first needs to go to the makers of the various operating systems. An app like LabVIEW would need the ability to lock down sections of the disk and prevent all other apps, including the Explorer/Finder/command line/KDE/Gnome itself, from modifying those directories OR you're going to need a much much much more efficient mechanism for notifying an application when files change in directories that the app registers itself as caring about. The auto-populate folders that exist today are pretty much bleeding edge of what we felt we could achieve with the existing operating systems.

:( I don't think what I have in mind is that complicated...

The project "knows" the file name of the files it contains and therefore can keep a view of all file which name contains a other string token. Just that for a start would be nice and very nice if a file could appear in many of these "view" - which I like to call "smart folder" as a reference to "smart folders" in OS X.

Not sure I'm clear in my explanation... but implementing this to have "smart folder like" folders in the LabVIEW project window does sound too complicated to me, or am I missing something ?

Link to post
Share on other sites
  • 6 months later...

I saw many discussion about how to organise the VIs (and other type of file) in the lvproj window.

Now we have the auto-populating folder, the snap-shot folder, the virtual folder and the dependencies (am I forgetting another something ?), everyone has his way of using these options.

Until recently I was mostly using auto-populating folders in order to have the same hierarchy in my lvproj and in the windows explorer but I am now using more and more the virtual folders, they're cool but they're cool enough...

What I'd like to have a "smart folder" for which I could define a set of conditions to meet for a file to appear in it.

Conditions could be :

- an extension,

- a string token in the name of the VI,

- a date range for the date of last modification,

- a range of file size,

- does VI has documentation,

- who made the last modification,

- etc... to be continued...

Of course a file could appear in several "smart folders"... which is unfortunately not the case now for virtual folders.

:shifty: Mac users certainly use "smart folders" in Mac OS X.. well that what I'd like in the lvproj, anyone else's interested ?

I'm on my way to develop this with scripting, if anyone is interested, help will be very welcome here!

Link to post
Share on other sites

I can answer the "how to create a folder" question - Get the My Computer reference from the project (probably a property), then call the "Add Item" (or whatever it's called) method on that. It accepts a string input for the type of item (probably "Folder" in your case. If you want to be sure, iterate over a tree which has folder and get the type property for each item).

  • Like 2
Link to post
Share on other sites

I can answer the "how to create a folder" question - Get the My Computer reference from the project (probably a property), then call the "Add Item" (or whatever it's called) method on that. It accepts a string input for the type of item (probably "Folder" in your case. If you want to be sure, iterate over a tree which has folder and get the type property for each item).

If you got that from memory, I have to say I'm impressed... :thumbup1:

post-10515-125381752558_thumb.png

Link to post
Share on other sites

I can answer the "how to create a folder" question - Get the My Computer reference from the project (probably a property), then call the "Add Item" (or whatever it's called) method on that. It accepts a string input for the type of item (probably "Folder" in your case. If you want to be sure, iterate over a tree which has folder and get the type property for each item).

Thanks, this is exacly what I was looking for :)

Link to post
Share on other sites

This looks like an awesome feature. Can't wait to see the results.

Hmmm.. I'm not really happy with what I could get so far, but here's what I have : http://screencast.com/t/VIgQ4Z9w

To make it easier at first, for each found item I create an hyperlink, it works fine for VIs, but it's anoying to have "VI name (VI path)" in the project window. Another drawback is that if you double click a VI that is inside a LLB it won't open - seems to me that this is an OS issue.

Maybe the hyperlink is not a good idea in the first place... it was just easier because I didn't have to check if the item was already in the project (I mean not in the dependencies) and also I didn't have to care about Auto-populating folders. The root issue being that we can't have 2 items with the same name in a project :(.

If anyone has ideas, suggestions, comments... please tell me!

Link to post
Share on other sites

yeah, I'm much happier now.. here is what I do :

  1. check file extention
  2. check that file name contains the string tokken
  3. then check option exclusion (re-entranct?, has non-dynamic caller?)
  4. for items which satisfies 1, 2 and 3 :

  • if the item is under "dependencies" then it's moved to the newly created "Smart Folder"
  • if the item is alreay referenced in the project (I mean in another folder than "dependencies"), then an hyperlink to it is created in the "Smart Folder"

Will post it to LAVAcr soon :)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.