Solution
Any exception thrown when calling a .NET object property or method is converted into LabVIEW error 1172. This error means that LabVIEW received a .NET exception from the API you called. The typical message you will see is similar to:
1172, kLVE_DotNetException, A .NET exception occurred.
The root cause of the error will be related to the .NET Exception Message, as 1172 is a generic error code for any .NET Exception.
- In LabVIEW 8.0 and later, more information was added to the error messages by placing the .NET Exception Message property into the error source string in the error cluster. Unbundle the source element to view the additional information on the exception.
- In LabVIEW 7.x, the only information displayed was that a .NET Exception occurred. To resolve this error in LabVIEW 7.x, try one of the following:
- Ensure that the .NET assemblies that you are using are saved in the root directory of the top-level VI.
- Add the .NET assembly as a reference in LabVIEW by selecting Tools»Advanced»NET Assembly References. Click the Add button and navigate to the location of all the assemblies that you want to call.