LabVIEW Idea Exchange

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

Run Block Diagram Cleanup on any diagram elements that are modified when "Save for Previous Version" is applied

Status: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

The specific issue I've run into is that some newer LV features (like Auto-concatenating loop output tunnels and the expandable Merge Errors node) can be represented in earlier versions of LabVIEW with a more complicated combination of nodes and wires.  When "Save for Previous Version" is used, the equivalent code needs more diagram space, but ends up all crowded together on the block diagram.

 

Here's a specific example (sorry I don't have the original LV2012 source):

 

Auto-Concatenate Example.png

 

In this case, the empty array constant is actually connected to the shift register input of the loop that it is placed on top of.  This is completely invisible, though, and very difficult to decipher.  In my case, I tried to move that seemingly disconnected constant out of the way and inadvertantly broke the VI beahvior, because the wire was disconnected.

 

I've encountered this issue in particular when receiving support from NI Application Engineers using LV2012 who build sample VIs for me to test and then need to down-save them for me in LV2011. 

 

I propose that the "Save for Previous Version" automatically clean up the diagram for any nodes that needed to be changed/added in the down-save process (specifically to avoid overlapping and confusing nodes).

13 Comments
dthor
Active Participant

Make it optional and I'm all for it.

 

If I save rather large VIs for previous version, I don't want diagram cleanup to run. Sometimes it can do more harm than good, and I'd rather not have to check it after a Save-for-Previous. For smaller VIs, it would definitely be nice.

altenbach
Knight of NI

I would never want an automatic cleanup, even for e.g. the mess that's created when downconverting an "in place element" structure to a version where it did not exist. Typically, my diagrams are carefully layed out and cleanup would make things worse.

AristosQueue (NI)
NI Employee (retired)

Altenbach: I don't think he was suggesting cleaning the whole diagram, just the specific elements touched by the save for previous. Yes, that can bump around other elements, but only in a limited fashion that would, I think, be necessary anyway to make a saved-for-previous diagram readable. That would seem, in my book, to increase the overall readability of a saved-for-previous diagram. Would you agree with that evaluation? Note that we already do a cleanup-wires for most of our saves-for-previous substitutions.

KarstenT
Member

Yup, AQ clarified it exactly the way I was thinking it.  Run cleanup on the specific overlapping elements, not on the whole diagram.

altenbach
Knight of NI

If the cleanup is limited to the newly substituted code, it is probably OK.

(I would need to see it before really deciding if I like it. :D)

Manzolli
Active Participant

How about: Always do the local cleanup, but leave the pre-cleanup positions are saved in the undo. If I don't like the cleanup job, just undo!

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
altenbach
Knight of NI

There is no undo, because the downconverted VI only exists as file on disk and needs to be opened first is a suitable LabVIEW version. Even if a "save with stuff in undo buffer" functionality could be implemented in the future, the older LabVIEW downconversion targets would not know about it.

Manzolli
Active Participant

@Altembach I was wondering if the undo processes was possible. Version 4 and lower have no undo, the solution will cover the majority of cases but not all. Good point.

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
AristosQueue (NI)
NI Employee (retired)

Manzolli: Altenbach's point was that LV 2013 does not have the ability to load an undo stack from the file. Undo stacks are never saved with the VI -- indeed, there are very few document editing systems that choose to save the undo stack in the file (MS Word does not, for example, but I know some CAD programs do). The first system that could take advantage of this would be LV 2015 assuming that we added "load undo stack from file" into LV 2014.

Manzolli
Active Participant

It's hard when you (I, in this case) don't know how things really works. My thinking was that after loading a saved to previous version VI (I don't know if it is possible to create a tag in the saved file indicating this), one of the first things to be done is to do a localized (selected items should also be saved) cleanup and then it would be in the undo stack. Again, since I don't know exactly how LabVIEW works under the hood...

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil