ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing a .NET assembly by String reference

The CDapDelivery can either be of type CDapMessage or CDapNotification.  This is the code I need to implement in LabVIEW:

 

foreach (CDapDelivery DapDelivery in DapDeliveries)
        {
          if (DapDelivery is CDapMessage)
          {
            CDapMessage DapMessage = (CDapMessage)DapDelivery;
            LogTextBox.AppendText(String.Format("received message terminal={0}\r\n", DapMessage.TerminalID));
          }
          else if (DapDelivery is CDapNotification)
          {
            CDapNotification DapNotification = (CDapNotification)DapDelivery;
            LogTextBox.AppendText(String.Format("received notification ID={0} state={1}\r\n",
              DapNotification.MessageIdentifier, DapNotification.MessageDeliveryStatus.ToString()));
          }
        }

0 Kudos
Message 11 of 12
(491 Views)

It appears that you're dealing with a C++ class that inherits from multiple base classes. I've never had to use such a class so I don't know if the GetType on the individual list item will return the right base class name. You could try it, I suppose.

0 Kudos
Message 12 of 12
(479 Views)