05-25-2020 05:35 AM
Hi,
I'm trying to call the VI Analyzer through the NI LabVIEW CLI.
Documentation and example can be found here:
https://zone.ni.com/reference/en-XX/help/371361R-01/lvconcepts/cli_predefined_operations/
So I make a new NI Analyzer task manually, that I want to call from the command line.
LabVIEWCLI -LabVIEWPath "C:\Program Files (x86)\National Instruments\LabVIEW 2018\LabVIEW.exe" -OperationName RunVIAnalyzer -ConfigPath "C:\Git\0000 Test For Delete\analyzefile.viancfg" -ReportPath "C:\Git\0000 Test For Delete\output.html" -ReportSaveType "html"
However, this just throws an error
Operation output:
Error Code : 85
Error Message : Scan From String (arg 1) in RunVIAnalyzer.lvclass:ParseArgumentsCore.vi->RunVIAnalyzer.lvclass:ParseArguments.vi:2800001->RunVIAnalyzer.lvclass:RunOperation.vi:5910001->CoreOperation.lvclass:CallRunOperation.vi:4230002->ExecuteRunOperation.vi:5250001->ExecuteOperation.vi:6900002->ExecuteOperation.vi.ProxyCaller
An error occurred while running the RunVIAnalyzer operation.
RunVIAnalyzer operation failed.
Any idea what is wrong?
Solved! Go to Solution.
05-26-2020 08:56 AM - edited 05-26-2020 08:59 AM
Within ParseArgumentsCore.vi there is a scan from string that converts the -ReportSaveType argument. Here is the block diagram:
And here are the options for the enum:
You need to match the case exactly, or else the scan from string will fail.
Would be nice if they had mentioned that in the help docs. Edit: Even worse! There's an example in the help docs that use 'html' in all lowercase!
05-27-2020 03:15 AM
Thanks, you are absolutely right!!
Yeah, I just copied the example which didn't work... Hehe...