Antoine Chalons Posted March 6, 2009 Report Share Posted March 6, 2009 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. Mac users certainly use "smart folders" in Mac OS X.. well that what I'd like in the lvproj, anyone else's interested ? Quote Link to comment
LAVA 1.0 Content Posted March 6, 2009 Report Share Posted March 6, 2009 QUOTE (Antoine Châlons @ Mar 5 2009, 05:02 PM) Of course a file could appear in several "smart folders"... which is unfortunately not the case now for virtual folders. Good idea! Specially the possibility to have files in multiple places (if applicable) Ton Quote Link to comment
Aristos Queue Posted March 8, 2009 Report Share Posted March 8, 2009 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. Quote Link to comment
Antoine Chalons Posted March 10, 2009 Author Report Share Posted March 10, 2009 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 ? Quote Link to comment
Antoine Chalons Posted September 24, 2009 Author Report Share Posted September 24, 2009 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. 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! Quote Link to comment
Yair Posted September 24, 2009 Report Share Posted September 24, 2009 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). 2 Quote Link to comment
Francois Normandin Posted September 24, 2009 Report Share Posted September 24, 2009 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... Quote Link to comment
Antoine Chalons Posted September 24, 2009 Author Report Share Posted September 24, 2009 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 Quote Link to comment
Yair Posted September 25, 2009 Report Share Posted September 25, 2009 If you got that from memory, I have to say I'm impressed... I did it recently and the tricky points (you have to get the MyComp ref and give the type as a string) stuck. Quote Link to comment
Michael Aivaliotis Posted September 26, 2009 Report Share Posted September 26, 2009 This looks like an awesome feature. Can't wait to see the results. Quote Link to comment
Antoine Chalons Posted September 28, 2009 Author Report Share Posted September 28, 2009 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! Quote Link to comment
Antoine Chalons Posted September 29, 2009 Author Report Share Posted September 29, 2009 yeah, I'm much happier now.. here is what I do : check file extention check that file name contains the string tokken then check option exclusion (re-entranct?, has non-dynamic caller?) 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 Quote Link to comment
Antoine Chalons Posted September 30, 2009 Author Report Share Posted September 30, 2009 Here's the latest version, it starts to be usefull http://screencast.com/t/ZjfMcSXOt 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.