Working with ActiveX Events

ActiveX events let you store all data for a specific action that occurred as a result of an ActiveX communication. Refer to the examples\comm\axevent.llb for examples of using ActiveX events.

Complete the following steps to create a VI that creates and waits on an ActiveX event queue and then destroys the event queue. An event queue is a tag that corresponds to an internal list of events an ActiveX control receives.

Note  If you generated an Automation Refnum using an Automation function, skip step 1.
  1. On the front panel, select Controls»ActiveX»Container.
  2. Select the Create ActiveX Event Queue VI on the Functions»Communication»ActiveX»ActiveX Events palette and place it on the block diagram.
  3. Wire the ActiveX container refnum or the ActiveX automation refnum to the Automation RefNum input of the Create ActiveX Event Queue VI.
  4. Select the Wait On ActiveX Event VI on the Functions»Communication»ActiveX»ActiveX Events palette and place it on the block diagram.
  5. Wire the Event Queue output from the Create ActiveX Event Queue VI to the Event Queue input of the Wait On ActiveX Event VI.
  6. Select the Destroy ActiveX Event Queue VI on the Functions»Communication»ActiveX»ActiveX Events palette and place it on the block diagram
  7. Wire the Event Queue output from the Wait On ActiveX Event VI to the Event Queue input of the Destroy ActiveX Event Queue VI.
  8. Run the VI.