LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create a good Undo action

As described by Darren I tried to create an Undo action:

http://lavag.org/uploads/1249844999/gallery_2399_13_42.png

But unfortunatly the Referenced VI does not show an 'Undo' action named CCT:Clean Up.

Anyone got this working?

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 1 of 7
(8,879 Views)

I'm kind of having the same problem. See the two threads referenced below.

http://decibel.ni.com/content/thread/3661?tstart=0

http://decibel.ni.com/content/thread/3611?tstart=0

Are you running this from the JKI RCF or just as a stand alone script?



Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 7
(3,354 Views)

Hi Ed,

No, I run this code clean, but nothing happens somehow.

Ton

PS the URL you typed are correct however the HTML code sends you to the wrong page, here are two correct links, 1Undo Oddness and 2Relink to VI problem.

Allright there is a serious bug in the URL insertion of NI, it strips out the 'content' part of the URL...., used the 'Browse history' feature

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 7
(3,354 Views)

Is anybody able to show code (in 8.6) that creates a good undo record?

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 7
(3,354 Views)

This is a bug with the BD.Cleanup method of the VI class...for whatever reason, calling this method, even inside an Undo transaction, fails to create the transaction, and erases the Undo stack.  I have filed CAR# 190202 on this issue.  The problem occurs in both LabVIEW 8.6 and 2009.  The workaround is to call the Clean Up Diagram method of the TopLevelDiagram class instead:

cleanup_undo_workaround.png

-D

0 Kudos
Message 5 of 7
(3,354 Views)

Thanks Darren,

I will try this out later.

I have tried this out and it works like expected.

If I read your post correctly, no 'undo' on the VI reference is correctly interpreted, or is this only valid for 'CleanUp'?

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 7
(3,354 Views)

You should be able to undo other actions on the VI class just fine.  It's just the BD.Cleanup method that doesn't work with undo transactions properly...

-D

0 Kudos
Message 7 of 7
(3,354 Views)