Jump to content

How to get list of events from an Event Registration Refnum (as variant)


Recommended Posts

With VI Scripting, I can get the data type of an Event Registration Refnum as variant. How could I get the list of events (at least their names) that it contains?

I need that to know what events are registered in an event structure, and at what indices, in order to manipulate the dynamic events in the structure with Scripting.

Link to comment

Thank you François, that's a nice library!

Would it be possible to also get the event types from the TD (User Event/Mouse Up/...)? I don't find where this data is located in the TD.

Ideally the event type should be a "vi.lib\event_ctls.llb\lveventtype.ctl" (so that it matches with the EventStructure:Get Handled Event method), but I don't know if the values match . In the enum, User Event is x41, but there is no x41 at all in the TD.

Link to comment

They show up as Generic Refnums. (0x08)
If they are named refnums, they should show up as in this example where "This VI" is the label. You can tell if they are named references by the 0x40 flag.

If your events are named, they will show up in the list. The type of event is set in the last long byte in the "First Element" highlighted in green in the screenshot. (xA4 10)
xA4 = VI reference, x10 = Key Down. I'll add this support to the OpenDescriptor. That is definitely useful info to get! I'll report here when done.

 

image.png.52200059e4df00b171b4ab42dce2d531.png

image.png.928e4638ffa6c0e3def574214825f72c.png

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.