# CVMWrite3DCalibrator error -2147483629

**URL:** <https://forum.commonvisionblox.com/t/cvmwrite3dcalibrator-error-2147483629/1885>\
**Category:** C++ API\
**Created:** [January 11, 2023, 5:05pm UTC](https://forum.commonvisionblox.com/t/cvmwrite3dcalibrator-error-2147483629/1885 "2023-01-11T17:05:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quiztus](https://avatars.discourse-cdn.com/v4/letter/q/7cd45c/32.png) [@Quiztus](https://forum.commonvisionblox.com/u/Quiztus)\
**Post date:** [January 11, 2023, 5:05pm UTC](https://forum.commonvisionblox.com/t/cvmwrite3dcalibrator-error-2147483629/1885/1 "2023-01-11T17:05:35Z")

</div>

Hi, I try to calibrate my AT C5. I use the code snippet from the documentation:  
[Metric DLL Reference: 3D Calibration ([https://help.commonvisionblox.com/NextGen/14.0/cvb/metric/d3/daf/group\_\_\_calibration3\_d.html#ga4c87d54d448c38fc9e59fd3c2a2bf5fc](https://help.commonvisionblox.com/NextGen/14.0/cvb/metric/d3/daf/group___calibration3_d.html#ga4c87d54d448c38fc9e59fd3c2a2bf5fc))  
I fail to save the calibration to json. I use:

```auto
 const char* calibFile = "SICalibration.json";
    if (auto error = CVMWrite3DCalibrator(calib, calibFile))
         return error;

```

The error is = -2147483629

Is it possible to cast CVC3DCALIBRATOR calib to something more meaningful as a void\*?

---

<div class="post-metadata">

**Author:** ![Quiztus](https://avatars.discourse-cdn.com/v4/letter/q/7cd45c/32.png) [@Quiztus](https://forum.commonvisionblox.com/u/Quiztus)\
**Post date:** [January 12, 2023, 12:17pm UTC](https://forum.commonvisionblox.com/t/cvmwrite3dcalibrator-error-2147483629/1885/2 "2023-01-12T12:17:28Z")

</div>

please find the used code,rangeImage and cfg to reproduce this error here [zip](https://tempfile.io/en/xipaivQAxzRillr/file)

Further Information: Win 10 , C++17, Visual Studio

---

<div class="post-metadata">

**Author:** ![Simon](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/simon/32/847_2.png) [@Simon](https://forum.commonvisionblox.com/u/Simon)\
**Post date:** [January 12, 2023, 3:24pm UTC](https://forum.commonvisionblox.com/t/cvmwrite3dcalibrator-error-2147483629/1885/3 "2023-01-12T15:24:45Z")

</div>

Hi @Quiztus,

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.

---

<div class="post-metadata">

**Author:** ![Quiztus](https://avatars.discourse-cdn.com/v4/letter/q/7cd45c/32.png) [@Quiztus](https://forum.commonvisionblox.com/u/Quiztus)\
**Post date:** [January 12, 2023, 4:19pm UTC](https://forum.commonvisionblox.com/t/cvmwrite3dcalibrator-error-2147483629/1885/4 "2023-01-12T16:19:50Z")

</div>

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?

 ![error](https://canada1.discourse-cdn.com/flex027/uploads/commonvisionblox/original/2X/e/e2d610db28a095f5062aadc992067e3368810a1c.png)

---

<div class="post-metadata">

**Author:** ![Simon](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/simon/32/847_2.png) [@Simon](https://forum.commonvisionblox.com/u/Simon)\
**Post date:** [January 13, 2023, 9:04am UTC](https://forum.commonvisionblox.com/t/cvmwrite3dcalibrator-error-2147483629/1885/5 "2023-01-13T09:04:15Z")

</div>

Hi @Quiztus,

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:  
 ![grafik](https://canada1.discourse-cdn.com/flex027/uploads/commonvisionblox/original/2X/c/c54a5a83350a0ee8a2b2e0b278b826ca57b1146a.png)

You can get a free trial license valid for 30 days using the CVB License Manager to test the functionalities of the Foundation Package:

 ![grafik](https://canada1.discourse-cdn.com/flex027/uploads/commonvisionblox/original/2X/6/619ec83776a3017536fcebdace078de882aba88a.png)  
There is also the option to acquire full Node Locked licenses or a dongle.  
[CVB 14.00.002](https://forum.commonvisionblox.com/t/common-vision-blox-for-windows/1574/36) can be downloaded here, but will not solve the licensing issue:

---

<div class="post-metadata">

**Author:** ![Quiztus](https://avatars.discourse-cdn.com/v4/letter/q/7cd45c/32.png) [@Quiztus](https://forum.commonvisionblox.com/u/Quiztus)\
**Post date:** [January 13, 2023, 9:52am UTC](https://forum.commonvisionblox.com/t/cvmwrite3dcalibrator-error-2147483629/1885/6 "2023-01-13T09:52:26Z")

</div>

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…
