LabVIEW Idea Exchange

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

When comparing VIs, set "Only show objects with open front panels" as default

Status: New

Comparing VIs which have closed front panels is (almost) never used. Therefore it should not be the default.

 

The Dialog for selecting a VI shows all VIs in memory when first opened. There is a checkbox to "Only show objects with open front panels". It is not checked by default. I suggest to set its default value to true (=checked).

 

Comparing VIs is started in  "Tools" -> "Compare" -> "Compare VIs...". In the new dialogue, click on "Select..." (for any of the two VIs). The check box labeled "Only show objects with open front panels" is located near the bottom.

Selecting a VI for comparision.png

 

The (write protected) VI of this dialog is at <vi.lib>\Utility\allVIsInMemory.llb\VIMemory Select a VI.vi

The calling VI is at <LabVIEW dir>\project\_procmpvis.llb\CMP Compare VIs.vi

No idea where else "VIMemory Select a VI.vi" is called.

5 Comments
AristosQueue (NI)
NI Employee (retired)

> Comparing VIs which have closed front panels is (almost)

> never used. Therefore it should not be the default.

 

You have user polls to back this assertion? 😉

 

A pretty common use case is to check a hierarchy of VIs before checking it into a source code repository. That generally means diffing the hierarchy for any changes, panel or diagram, so you can show your buddy what you have changed.

 

I won't argue which one is more common with you across users, though I will say my personal usage is I pretty much always want both panel and diagram. What I will argue is that it is better to see diffs by default and say, "Oh, I don't care about those" than to not see diffs and think that you haven't made any changes when you actually have. That way leads to the insane programmer crying out, "How can my app be broken?! I didn't change anything!" 🙂

 

This is easy to toggle. Given that we have at least two common useage patterns, it doesn't really matter which is *more* common. I would argue against changing the default. And this is one of those settings where I would equally argue against saving last-used value between usages -- every trip into VI comparison is likely to be a new compare and, again, it is better to show than to hide unless explicitly told to hide, in my opinion.

fabric
Active Participant

@AQ: I don't buy it! Smiley Tongue

 

The OP refers to "Comparing VIs", so I presume he is referring to the workflow "Tools>Compare>Compare VIs>Select", although the same dialog is accessible via "Tools>Compare>Compare VI Hierarchies>Browse Memory" too. It seem that your comments regarding hierarchies and diff results apply to the "Compare VI Hierarchies" dialog, which is probably another conversation.

 

Anyway, shb's dialog currently shows all VIs in memory as the default, which provides a completely user-unfriendly experience in any decent sized project. Anyone who is sophisticated enough to find and use this dialog is surely clever enough to know whether they have search filters enabled. And anyone needing to use this dialog on a decent sized project will almost certainly adopt tricks like making sure their target VIs are open first, so they can avoid sifting through a seemingly endless list of irrelevant entries from vi.lib.

 

If nothing else, at least allow my preferences to persist.

AristosQueue (NI)
NI Employee (retired)

Fabric: You have two projects. Open the panels of all VIs in one project. Begin with the top-most VI. Do Compare VIs... and Select... I want to see the VIs that are in the second project even though I haven't opened all their panels because that's the project I'm diffing against. Going individually through my VIs lets me do the compare then close the panel. Compare VI Hierarchies doesn't work so well for me as singly comparing VIs like this.

 

Now -- I will happily admit that most of my G hierarchies are smaller than most user hierarchies, so I'm definitely a statistical outlier here.

 

I should also say that I give a general kudos to "do something to improve selecting two VIs to diff against and generally diffing two projects that are not necessarily a single VI hiearchy". 🙂

fabric
Active Participant

@AristosQueue (NI) wrote:

... You have two projects. Open the panels of all VIs in one project. Begin with the top-most VI. Do Compare VIs... and Select... I want to see the VIs that are in the second project even though I haven't opened all their panels because that's the project I'm diffing against.  ...


That's a valid use case, but sifting through all VIs in memory is a pretty frustrating way to get the job done. I normally just open the "Compare VIs" dialog, paste the path of the first VI into the field for the second, then do a quick text edit... But I will happily admit that most of my G hierarchies are larger then most NI employee hierarchies. Smiley Wink

 

Now... Where do I deposit my kudos for your closing statement?

d.w.b
Member

The option could default checked if opening from Tools>Compare>Compare VIs>Select and unchecked if from Tools>Compare>Compare VI Hierarchies>Browse Memory but what makes much sense is for LabVIEW to remember the last state of that check box (in LabVIEW.ini) and restore it per last use for each developer.