Error 1 or 1172 When Trying to Add a .lvmodel in NI Veristand

Updated Apr 5, 2023

Reported In

Software

  • VeriStand
  • LabVIEW

Issue Details

I am receiving an Error 1 or 1172 when I try to add LabVIEW (.lvmodel) in NI Veristand. The error is shown below figure. How can I resolve it?

Error 1172 occurred at Constructor Node Error creating instance of Model in Assembly NationalInstruments.Veristand.SystemDefinitionAPI.Model
Possible reason(s):
LabVIEW: A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.

 

Solution

Before creating the .lvmodel, the LabVIEW VI must have the array populated with values and these set as the default values.
  1. Open the LabVIEW VI that will generate the .lvmodel
  2. Run the VI to ensure the array is initialized with values
  3. Once values are populated, select and right-click on the array, from the shortcut menu select Data operations»Make Current Value Default like the below figure
  1. Save the VI
  2. Generate the .lvmodel, ensure you are not overwriting an existing model
  3. From the toolbar select Tools»NI Veristand» Generate Model
  4. Open NI Veristand and navigate to Operate»System Explorer
  5. In the system, explorer window navigate to Controller»Simulation Models
  6. Add the Simulation Model
If you are still seeing the error after ensuring that your arrays have been initialized properly, then there could be an issue with some .NET security restrictions. To resolve this, try uninstalling and reinstalling .NET framework on your machine.