09-01-2010 09:17 AM
@Ben wrote:
Most of the events offer a control ref node taht can be used to get the name of the control associated with the event.
Does not help with the timeout case of course.
Ben
Yep, that almost works, but the User Events output a UsrEvtRef and not a CtlRef. Could still be used, but not without more wiring and more nodes.
09-01-2010 11:16 AM
@Ravens Fan wrote:
The reason that the VisFrame EventStructure scripting property is not useful is that it only defines what frame is showing on your block diagram, and when you are running, it doesn't matter which is showing.
I bet if you turn on Execution Highlighting, which flips the frames as it executes, that the node would do what you're wanting. Doesn't solve BrokenArrow's problem, but might be useful to someone else.
09-01-2010 12:08 PM
@Aristos Queue wrote:
@Ravens Fan wrote:
The reason that the VisFrame EventStructure scripting property is not useful is that it only defines what frame is showing on your block diagram, and when you are running, it doesn't matter which is showing.
I bet if you turn on Execution Highlighting, which flips the frames as it executes, that the node would do what you're wanting. Doesn't solve BrokenArrow's problem, but might be useful to someone else.
@and that was the second part of what I wrote:
"The exception, (and I haven't tried this to test it out), would be if you have highlight execution turned on since the BD changes its appearance from one event case to another depending on which code is running. However, if you are doing something to debug event structures, then you probably aren't going to have Highlight execution turned on as that would completely mess up any event timing you are trying to look at."
09-01-2010 12:28 PM
A bit off topic, but referring back to the code I posted, I can easily "find" the Event Structure labeled "hello" with the code shown. However, when I wrap a While Loop around the Event Structure, I can not find the Event Structure, and I've tried all sorts of things like using the labeled While Loop's refnum into the "owner" input, etc, with an array of names into name/order. Any help?
09-01-2010 12:36 PM
When you are looking for objects buried in structures I recommend doing a traversal. There is a great VI in the vi.lib to do this:
vi.lib\Utility\traverseref.llb\TRef Traverse for References.vi
This will return references to all Event Structures (probably not a large number if your VIs look like mine) which you can verify by label if necessary.
09-01-2010 01:14 PM - edited 09-01-2010 01:16 PM
Thanks Darin, I didn't think of that.
BTW, that VI has been renamed and is on the VI Scripting palette as Traverse for GObjects.vi. The one you referenced still exists, but it is just a wrapper for Traverse for GObjects.vi (in 2010 that is).
09-01-2010 01:27 PM
Ravens Fan wrote:[...]
The exception, (and I haven't tried this to test it out), would be if you have highlight execution turned on since the BD changes its appearance from one event case to another depending on which code is running. [...]
Purely academic, but I have confirmed this to be true. Not so useful of course, since you are running so slow you can just watch the structure.