LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture Events When Writing Block Diagrams


@Ben wrote:

@mcduff wrote:

@Saheed wrote:

Hi All,

 

I am a PhD student working on a project that monitors how LabVIEW developers write code and when they make a change to code.

 


Maybe one of the scripting experts can chime in, because I am not one. But is there a way to access the "undo" list. LabVIEW keeps a history of actions in the undo list so you can undo them. If there is a way to tap into this list, then you can see what is changing.

 

mcduff


Undoing the Undo List!

 

That is enough of a contradiction to entertain me. I like it.

 

It is not my favorite contradiction but good enough for this thread.

 

 

Spoiler

From the KJV version of the Bible, I believe there is a line in 2 Kings that reads...

 

".. in the morning when they woke up, they were all dead."

 

 

 

Ben


I *HATE* when that happens.

 

And then they had a cup of coffee each and rejoined the the world of the living.

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 11 of 14
(583 Views)

@mcduff wrote:

@Saheed wrote:

Hi All,

 

I am a PhD student working on a project that monitors how LabVIEW developers write code and when they make a change to code.

 


Maybe one of the scripting experts can chime in, because I am not one. But is there a way to access the "undo" list. LabVIEW keeps a history of actions in the undo list so you can undo them. If there is a way to tap into this list, then you can see what is changing.

 

mcduff


I've had a look around and the only thing I see in the VI scripting is that you can get whether an Undo is possible, and the text field that appears after the word "Undo" in the menu (so if you move a subVI, you can see a True Boolean plus the word "Move").

 

If you look how the Undo mechanism actually works, it basically takes a snapshot of the current VI state and caches it in memory.  When you undo or redo, it switches to that snapshot.  It doesn't keep track of what was done to change from one state to the other except for that one short string.

 

You can programatically call the Undo and Redo methods, so I suppose you could write something that calls Undo a bunch of times, then alternate Redo calls with analyzing the entire VI to see what actually changed.

Message 12 of 14
(572 Views)

@Saheed wrote:

Hi All,

 

...

Any suggestion or help is really appreciated!

 

Thanks

Saheed


Hi Saheed,

 

Could please update this thread after you decide how you will be approaching this question please?

 

I am sure your adventures will serve others in the futures.

 

And if you can post code that would be very helpful as well.

 

 

Thank you!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 14
(549 Views)

Thanks Ben, I plan to have all the code on Github. I will also update this thread if something interesting comes up and post some code.

Message 14 of 14
(535 Views)