02-13-2019 04:45 PM - edited 02-13-2019 04:47 PM
@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.
SpoilerFrom 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.
02-13-2019 05:29 PM
@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.
02-14-2019 09:15 AM
@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
02-14-2019 12:40 PM
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.