11-10-2009 01:28 PM
I am wondering why a BD cleanup called via an Invoke Node is not un-doable. Same is true for Remove Bad Wires (scripting method). Specifically setting up a transaction (scripting again) does not seem to help.
Scripting issues I'll probably take up on the scripting board, but the BD cleanup method is fully public. The other funny thing is that it doesn't seem to trigger a re-trigger a compilation of the VI. Cleanup (programmatic) removes broken wires, but LV still claims the VI is broken until you run it and it works fine. Minor nuisance compared to missing the undo option, especially since the "cleanup" is a bit of a roll of the dice.
Solved! Go to Solution.
11-10-2009 01:37 PM
I think the undo needs a user-interaction, and doing someting programmatically is causing no user-interaction.
Christian
11-10-2009 02:05 PM
Christian_M wrote:I think the undo needs a user-interaction, and doing someting programmatically is causing no user-interaction.
Christian
I can go in and wreak havoc on the block diagram using scripting, and so long as I properly start and end the undo transaction, I can go to the affected BD and undo the scripting activity. Something in the BD cleanup method is wiping out the undo transactions. I don't mind setting up the undo manually, it is a habit I have gotten into, just frustrating that it is all-for-naught.
Probably an issue for the scripting experts (are there any? Seems like a dark art still), I know that this is one method I won't often invoke with the undo safety net.
11-10-2009 02:54 PM
11-10-2009 03:07 PM - edited 11-10-2009 03:13 PM
Thanks, I'll try. I have asked over on the scripting board as well and will update if I find a solution.
Edit: We have a winner. Using the scripting method 'CleanUp' on Diagram.TopLvlDiag is Undoable. Thanks!
11-12-2009 07:25 AM