06-25-2018 12:30 AM
In the LabVIEW Project explorer, we can right-click -> Arrange By (Name, Type, Path, Custom). However, I cannot seem to save my choice. When I close and re-open my project, it reverts to Arrange By Name. Tested on LabVIEW 2017 SP1.
In contrast, Targets (e.g. "My Computer") and Virtual Folders outside .lvlib/.lvclass files can be permanently sorted.
Am I missing something?
06-25-2018 02:41 PM
I believe the sorting is saved in the lvproj file (tag "NI.SortType"). The lvproj file only refers to container items such as libraries and its derivative classes, not to their contents. Libraries don't normally have a "NI.SortType" tag so any sorting you specify doesn't get saved - this would require the lvlib/lvclass to also be saved to recall your setting.
I haven't tried manually adding this tag to a library file to see if that permanently saves the sorting. You could try it and find out.
06-26-2018 03:33 AM - edited 06-26-2018 03:34 AM
Thanks for your insight, tyk007.
LabVIEW does write "NI.SortType" to .lvlib/.lvclass files, but seems to ignore this tag when loading the file.
Here's my experiment:
06-26-2018 07:57 AM
I'm seeing the same behavior in LabVIEW 2016 and 2017 SP1 for the Arrange By -> Type and that it seems to be going back to arranging by name. However, this is expected behavior. See the LabVIEW Help: "If you sort a project library by Type or by Path, LabVIEW automatically re-sorts the project library by Name the next time you open the project library."
Sorting Items in a Project : http://zone.ni.com/reference/en-XX/help/371361P-01/lvhowto/organizing_items_project/
It does preserve the arrangement for Arrange By -> Custom. Though perhaps not the workflow you'd like, if it's important that your VIs are sorted by type/in a certain way in your library, you can arrange it by the Custom sorting.
06-26-2018 08:32 AM
However, this is expected behavior. See the LabVIEW Help: "If you sort a project library by Type or by Path, LabVIEW automatically re-sorts the project library by Name the next time you open the project library."
And who thought that was a good idea? I would really like to see the data that says this behavior is desirable.
06-26-2018 09:10 PM
Hello R Dahlman, thank you for linking us to the relevant part of the official documentation!
I'm with @crossrulz though: The documented behaviour is unintuitive and does not benefit the user in any way (as far as I can see). Could you please check with LabVIEW R&D what their rationale was? Also, are they willing to change this behaviour?
06-27-2018 12:49 PM
Since it's not a bug and is instead different functionality, it will be best to post on the LabVIEW Idea Exchange with your thoughts! Our R&D teams actively monitor the Idea Exchange for new feature requests and the more wanted a feature, the more likely they'll take a look at it.
Since there's a couple people active on here as well, you can post your LabVIEW Idea Exchange post link here, and people that find this post can go Kudo or comment on your Idea Exchange post to get it visibility.
LabVIEW Idea Exchange : https://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas