LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can the cleanup tool force code to a single page

I have code that I inherited that was written without concern for fitting onto a single screen. I would like to run the clean up tool to automatically force it, or portions of it to a single size. Is there a way to run the cleanup tool with a maximum size as a parameter? Thanks.

0 Kudos
Message 1 of 2
(2,567 Views)

I have never seen anything like that and doubt it could be made to work consistently. Where would it put everything on a diagram that started out 8 screens wide and 5 screens high?

 

Diagram cleanup almost always makes diagrams bigger. Sometimes it makes them more readable, but not always.

 

I find it more useful for cleaning up small to moderate selections of code.

 

When I am trying to reduce the size of a bloated block diagram I find that making subVIs from sections of the code works reasonably well as a starting point. Try to make subVIs from code which is logically related in some way, not just close on the original diagram.

 

The other issue is that oversized diagrams often result from poor architecture choices. Changing to a Producer/Consumer or State Machine is often better than just putting it on a diet. If you decide to do that, make a copy of the VI to get all the front panel controls and indicators.  Remove all the code from the block diagram. Drop a framework for the desired architecture from a Design Pattern Template. Then drop those subVIs you were creating on the other copy of the big diagram into the appropriate place on the new block diagram.  You can also drag sections of code from the old VI to the new one.  Document what each section or subVI does as you go.

 

Lynn

0 Kudos
Message 2 of 2
(2,561 Views)