Sorry for the late reply, i figured it out by myself in the end. I found out that the pointers were the problem.
What I do now is during the initialisation I create a HWindowControl (HSmartWindowControl is NOT working properly, in my case at least), define all the settings (Handle, implementation in HDevEngine,...) and then I send the WindowID as an input of the procedure I call (which I created myself for other data manipulation and contains "visualize_object_model_3d" at some point). As a result I get the display window directly in the front panel of my VI.
No doubt your solution works as well but this is way is a bit different so I thought I would share it if that can help someone. I have been struggling with this for a long time.
Thanks for your time anyway.
Test under this program LV TO HALCON image running time is long will be out of memory and then an error please help below the answer thank you LV2014 HALOCN12.0
You should dispose of the memory right after you have generated a HImage object with GenImage1 or GenImage3 method. This is from the sample that I posted earlier.
Please, don't use CIN method because it's unreliable in some cases.