LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Code became invisible, fragmented and shifted on the block diagram


@Ben wrote:

@johntrich1971 wrote:

I would try doing a block diagram cleanup. I don't normally recommend auto-cleanup, but in this case it might be worth a try.


My money would be on Clean up making things worse.


You may very well be right. In the few times that I've seen it used it did reduce white space, but it probably does expand it first.

0 Kudos
Message 11 of 17
(1,169 Views)

@johntrich1971 wrote:

I would try doing a block diagram cleanup. I don't normally recommend auto-cleanup, but in this case it might be worth a try.


I recommend against that as it is likely to blow past the block diagram size limits.  In code like that instead of acting like a broom and cleaning up your code, it acts more like a stick of dynamite and blows it up to 20 times the size.  Although I don't know, maybe it is smart enough to stay inside the bounds?

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 12 of 17
(1,151 Views)

@Taggart wrote:

@johntrich1971 wrote:

I would try doing a block diagram cleanup. I don't normally recommend auto-cleanup, but in this case it might be worth a try.


I recommend against that as it is likely to blow past the block diagram size limits.  In code like that instead of acting like a broom and cleaning up your code, it acts more like a stick of dynamite and blows it up to 20 times the size.  Although I don't know, maybe it is smart enough to stay inside the bounds?


Yeah, I don't know. I don't use it as I don't like the results. I have seen it make block diagrams a lot smaller, though. I think that as long as the OP has followed other advice and made a repo then there's no real harm in trying.

0 Kudos
Message 13 of 17
(1,148 Views)

While it makes the code sometimes smaller (my personal code always gets larger though, and I never use cleanup!), I don't think the cleaned up code will be centered at 0,0 of the diagram, it might still be centered at a wrapped coordinate position making it worse.

 

(One of the most annoying features of cleanup is that the resulting code might be completely offscreen, making me stare at an empty diagram (especially with horrible code from the forum). Why can't it at least center the code at 0,0 and scroll it into view as a last step, right????)

 

 

0 Kudos
Message 14 of 17
(1,138 Views)

My personal LabVIEW proverb: "If the Cleanup Tool makes your block diagram look better, you're doing it wrong."

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 15 of 17
(1,132 Views)

@billko wrote:

My personal LabVIEW proverb: "If the Cleanup Tool makes your block diagram look better, you're doing it wrong."


I totally agree. I never use cleanup because the few times I've tried it I had to do an undo because it made my code less readable. In this case, though, we know that it was done wrong, so I don't see any harm in trying. As others have said there is a good chance that it won't work, but as long as the OP has a repo to revert to the only loss is a few minutes of time.

0 Kudos
Message 16 of 17
(1,081 Views)

@johntrich1971 wrote:

@billko wrote:

My personal LabVIEW proverb: "If the Cleanup Tool makes your block diagram look better, you're doing it wrong."


I totally agree. I never use cleanup because the few times I've tried it I had to do an undo because it made my code less readable. In this case, though, we know that it was done wrong, so I don't see any harm in trying. As others have said there is a good chance that it won't work, but as long as the OP has a repo to revert to the only loss is a few minutes of time.


Good point.  Go for it!  You really don't have much to lose.  

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
Message 17 of 17
(1,073 Views)