LabVIEW Idea Exchange

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

Fully restrict partial clean-ups to the selected area

Status: New

In LabVIEW 2009 we have the ability to ask LabVIEW to clean up the code of a selected part of the diagram. Unfortunately though the developers of this feature allowed themselves to do something the user would not expect at all - namely to adjust the surrounding code as well during this operation....One might say that instead of taking the selection as an absolute border - they feather the selection...This will typically produce effects that the user did not want...in fact, if he did - he would have selected that extended area of the code in the first place.

 

Let's say that I have made a perfectly layed out code...but in the middle of the data flow there is one case structure that is messy. So - I select the case structure and expect this to leave the surrounding code absolutely untouched...but what happens? It allows the "interface" between the selected code and the rest of the code to be modified, and messes up what was already good code - that was not marked for clean-up(!).  A very bad behaviour.

 

Please rewrite this so that it keeps the interface to the rest of the code fixed.

 

PS. This was initally added as a comment to the original idea for a selectable clean-up area that I submitted in 2009*, but on request I've subitted this here as a new idea... (*NI probably came up with that idea by themselves before that though, but at the time it was not known to the public).

Message Edited by Mads on 06-03-2010 08:50 AM
4 Comments
SatishK
NI Employee (retired)
What would your suggestion be if the act of cleaning up the seleceted code causes it to expand to need more space?
Mads
Active Participant

The optimization must operate within the given bounds. 

 

If the clean up does not produce a good result within the available area the user can then himself decide to add room manually by Ctrl-dragging and run the clean-up again.

 

------------------------

 

On a side note I support the idea of a clean-up with options, as suggested here.  One of the main arguments against that idea is that one way of implementing it would be to require a hidden keystroke combo (e.g. a Ctrl-click on the clean-up button). That argument is quite weak though - no reason have been given as to why such a combo should be a show stopper in this case, when it is already in such widespread use elsewhere in LV.

Mads
Active Participant

If there is no code above or below the selected area it would be OK to expand the selected area as that would not affect the tidyness of the surrounding code, however the interface to the surrounding code should be fixed. That means that if a wire enters into the selected area at a given coordinate then that coordinate is not to be changed.

 

If however there is code above or below the selected area then no expansion is allowed and the code clean-up must try to do it's job as best as possible within the existing area. 

JackDunaway
Trusted Enthusiast

Mads wrote:

If there is no code above or below the selected area it would be OK to expand the selected area...


...but not beyond the current window confines.

 

Possibly, if a structure is selected to be cleaned up, a dialogue asks which borders (L, R, T, B) are flexible and which are fixed? Or maybe those are properties of the structure itself? Not necessarily supporting this thought, just thinking aloud.