so far I was able to run you code using CVB 14.00.002 on Win10 x64 and save the resulting calibration file as json and txt-file. Which CVB version did you use?
I will try to get more information on the error code. Do you have full write access on your drive where you want to write the file to?
Note that using the CVMetric.lib is part of the “old” CVB C-API. The assemblies for the new CVB C-API can be found at %CVB%\Lib\C\cvb in you CVB installation folder.
I tried it on two different machines x64 with the 13.04.005 CVB version. I also tried the C# Gui in the Tutorials folder.
Where do I get your CVB Version?
the problem appears to be that you are currently not using a CVB Foundation license. This will prevent you from saving calibrators using CVB Metric. Actually you should get a message box that gives a hint on missing licenses:
You can get a free trial license valid for 30 days using the CVB License Manager to test the functionalities of the Foundation Package:
There is also the option to acquire full Node Locked licenses or a dongle. CVB 14.00.002 can be downloaded here, but will not solve the licensing issue:
Very sad that the error message is not more meaningful in that context. This error took me days. The warning arises during calibration creation, which actually works…