LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Petru_Tarabuta

Project Explorer: Fix small bug when VIs are arranged by name

Status: New

There is a small bug in the sorting of VIs by Name in Project Explorer.

 

If a virtual folder or an auto-populating folder contains VIs named "abc", "abc def", "abc def jkl", when the folder is set to "Arrange By >> Name" Project Explorer displays the VIs in the order 1. abc def jkl; 2. abc def; 3. abc. In other words, when there's a tie the longer name is displayed first. Breaking the tie in favour of the shorter name seems more logical, and is what Project Explorer does when sorting virtual folders.

 

The screenshot below shows the issue.

Screenshot 2.png

 

This was noticed in LabVIEW 2022 Q3. Please excuse if it's already been fixed in 2023 Q1.

1 Comment
raphschru
Active Participant

It seems they are simply sorting the full names (including the ".vi" extension), that's why your longer names appear first (a space is "smaller" than a dot in the ASCII table).

 

To solve this, they would have to split the base name from the extension, then sort by base name, then by extension in case of tie. But we must agree on how to do the splitting between the base name and the extension.

 

In my opinion, using the same method as in the "Get File Extension" VI from the File function palette should be enough for 99.99% of the cases. But what if you have more than one extension (e.g. ".tar.gz") or if you have no extension with dots in the name (e.g. "this.is.a.badly.named.file", or more viciously: "Some_binary_file_without_extension-v2.3") ?