LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Block diagram corrupted by "clean up selection"

Ok, this is entirely my own fault, but I just want to ask if there is anything I can do.

 

I have a state machine which had a fairly large block diagram, 1 display in height, and 2-3 in width. I can't find the "Tools > Profiles > VI metrics" to check how many pixels it is.

 

I selected a small section of my code this morning and clicked "Clean up selection".

This has extended my whole block diagram well outside the maximum 32000 pixel limit.

I (very stupidly) only realised this after I had saved.

Now, my whole block diagram won't render properly, or display half the items.There are wires going everywhere into 'nothing', and, it's very slow and unresponsive.

Other than restarting from my latest backup (which isn't very recent, again, my own fault), are there any things I can do to bring the block diagram back within the limits, so at least it's useable, and I can try to sort it out.

 

Thanks for any help,

Graham

0 Kudos
Message 1 of 17
(2,977 Views)

@grahamt8887 wrote:

Ok, this is entirely my own fault, but I just want to ask if there is anything I can do.

 

I have a state machine which had a fairly large block diagram, 1 display in height, and 2-3 in width. I can't find the "Tools > Profiles > VI metrics" to check how many pixels it is.

 

I selected a small section of my code this morning and clicked "Clean up selection".

This has extended my whole block diagram well outside the maximum 32000 pixel limit.

I (very stupidly) only realised this after I had saved.

Now, my whole block diagram won't render properly, or display half the items.There are wires going everywhere into 'nothing', and, it's very slow and unresponsive.

Other than restarting from my latest backup (which isn't very recent, again, my own fault), are there any things I can do to bring the block diagram back within the limits, so at least it's useable, and I can try to sort it out.

 

Thanks for any help,

Graham


Unfortunately, I don't know how to "go back in time" on something like this, other than physically doing it by reverting to an earlier version.  My personal take on the cleanup tool is that "If the cleanup tool consistently makes your code look better, you should probably rethink your approach to LabVIEW coding."  I think this is applicable here.  😞

 

ctrl + s is so comforting and so easy to do.  I understand how regrettable pressing that combination of keys can be.  😞

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.
0 Kudos
Message 2 of 17
(2,971 Views)

@billko...Graham

Unfortunately, I don't know how to "go back in time" on something like this, other than physically doing it by reverting to an earlier version.  My personal take on the cleanup tool is that "If the cleanup tool consistently makes your code look better, you should probably rethink your approach to LabVIEW coding."  I think this is applicable here.  😞

 

ctrl + s is so comforting and so easy to do.  I understand how regrettable pressing that combination of keys can be.  😞


Quoting This Old Tony, "Time travel is dangerous."

 

Did you try a ctrl-z ?

 

If have not gone too far it may be able to recover.

Spoiler
While it never works when I knock over a glass of wine,

 

it does sometimes work with the BD clean-up.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 17
(2,957 Views)

I think ctrl + z gets taken off the table the moment you save the VI, even if it is still open and in memory - a BIG complaint of mine!

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.
0 Kudos
Message 4 of 17
(2,955 Views)

@billko wrote:

I think ctrl + z gets taken off the table the moment you save the VI, even if it is still open and in memory - a BIG complaint of mine!


It just worked for me (LV 2017).

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 17
(2,941 Views)

You can try the Ctrl-Alt-click and drag to shrink the diagram. It might pull in the "stuff" that got caught in the nether.

 

Also, plug for using source code control, it's kinda hard to get your head around it initially but it's sure a lifesaver on times like this.

Message 6 of 17
(2,937 Views)

@Ben wrote:

@billko wrote:

I think ctrl + z gets taken off the table the moment you save the VI, even if it is still open and in memory - a BIG complaint of mine!


It just worked for me (LV 2017).

 

Ben


I just tried it in LV 2015 and it seemed to work here, too.  I thought I saw it in LV 2014 - but I could be misremembering things, too.

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.
0 Kudos
Message 7 of 17
(2,936 Views)

@BertMcMahan wrote:

You can try the Ctrl-Alt-click and drag to shrink the diagram. It might pull in the "stuff" that got caught in the nether.

 

Also, plug for using source code control, it's kinda hard to get your head around it initially but it's sure a lifesaver on times like this.


GREAT IDEA!

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.
0 Kudos
Message 8 of 17
(2,934 Views)

@billko wrote:

I think ctrl + z gets taken off the table the moment you save the VI, even if it is still open and in memory - a BIG complaint of mine!


"Undo after save" got introduced in LabVIEW 2011 according to this idea.

(There are still plenty of things that seem to clear the undo buffer on occasion)

Message 9 of 17
(2,926 Views)

@grahamt8887 wrote:

Ok, this is entirely my own fault, but I just want to ask if there is anything I can do.

 

...

I selected a small section of my code this morning and clicked "Clean up selection".

This has extended my whole block diagram well outside the maximum 32000 pixel limit.

 


NO, this is NOT your fault, but apparently a bug or poor exception handling in the cleanup code itself. The cleanup too should be aware of its boundaries and enforce never exceeding the range limits. What LabVIEW version was that?

 

(Yes, the cleanup tool is buggy and incomplete. I rarely use it (never on my code, occasionally of messy code found in the forum :D). For example often the entire cleaned up code ends up outside the visible diagram area. How hard would it be to re-center?? 🐵

 

The limit is actually twice that, because coordinates are also allowed to be negative i.e. the full I16 range.

Message 10 of 17
(2,923 Views)