HPutCPar (see figure 5.35) writes control data to the output control parameter with the index par of a HALCON operator. The num values in the Hcpar structure val are copied by this routine. Because the types of the parameter values (LONG_PAR, DOUBLE_PAR, STRING_PAR) are stored with each Hcpar structure, you can use a different type for every data element, see figure 5.38.
Note that HPutCPar automatically checks the result state of the underlying procedure similarly to the macro HCkP (see section “HCkP”). Thus, you must not use HCkP on HPutCPar yourself.
Hcpar par[2]; par[0].par.l = 6; par[0].type = LONG_PAR; par[1].par.d = 4.4; par[1].type = DOUBLE_PAR; HPutCPar(proc_handle,1,par,2);
Figure 5.38: Write the control parameter values [6,4.4] using HPutCPar.