set_checkset_checkSetCheckSetCheckset_check (Operator)


set_checkset_checkSetCheckSetCheckset_check — Activating and deactivating of HALCON control modes.


set_check( : : Check : )

Herror set_check(const char* Check)

Herror T_set_check(const Htuple Check)

void SetCheck(const HTuple& Check)

static void HSystem::SetCheck(const HTuple& Check)

static void HSystem::SetCheck(const HString& Check)

static void HSystem::SetCheck(const char* Check)

static void HSystem::SetCheck(const wchar_t* Check)   (Windows only)

static void HOperatorSet.SetCheck(HTuple check)

static void HSystem.SetCheck(HTuple check)

static void HSystem.SetCheck(string check)

def set_check(check: MaybeSequence[str]) -> None


With the help of the operator set_checkset_checkSetCheckSetCheckSetCheckset_check different control modes of the HALCON system can be activated or deactivated. If a certain control mode is activated, parameters etc., will be checked at runtime. Whenever an inconsistency is hereby detected, the program will be interrupted by an exception.

It is recommendable to activate the control modes during the development of a program and to deactivate them only after a successfully concluded test run. For if the control mode is deactivated and an error occurs, the system may react in an unpredictable way.

The HALCON system provides various possible control modes which can be activated and deactivated independently. By calling the operator set_checkset_checkSetCheckSetCheckSetCheckset_check with the name (CheckCheckCheckCheckcheckcheck) of the desired control mode, this control mode is activated; the control mode is deactivated by passing its name prefixed with a tilde (~, e.g., '~data').

Except for the control mode 'memory'"memory""memory""memory""memory""memory" that is set exclusively for the whole system, all control modes are set thread-specific by default. When preceding the name of these control modes with a 'ref_'"ref_""ref_""ref_""ref_""ref_" prefix, only the reference value of the particular mode is set. The reference value is used to initialize the respective mode when starting a new user thread.

Available control modes:


If this control mode is activated, only colors may be used which are supported by the display for the currently active window. Otherwise an error message is displayed.

In case of deactivated control mode and non existent colors, the {em nearest color} is used (see also set_colorset_colorSetColorSetColorSetColorset_color, set_grayset_graySetGraySetGraySetGrayset_gray, set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb).


If this control mode is activated, it will check the coordinates during the setting of the text cursor as well as during the display of strings (write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string) to the effect whether a part of a sign would lie outside the window frame (a fact which is not forbidden in principle by the system).

If the control mode is deactivated, the text will be clipped at the window frame.


(For program development)

Checks the consistency of image objects (regions and gray value components.


If this control mode is activated, the interface between the host language and the HALCON procedures will be checked in course (e.g., typifying and counting of the values).


This is a consistency check of objects (e.g., checks whether an object which shall be canceled does indeed exist or not.)


Determines whether errors shall trigger exceptions or not. If this control modes is deactivated, the application program must provide a suitable error treatment itself. Please note that errors which are not reported usually lead to undefined output parameters which may cause an unpredictable reaction of the program. Details about how to handle exceptions in the different HALCON language interfaces can be found in the HALCON Programmer's Guide and the HDevelop User's Guide.


If this control mode is activated when calling the operators open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window, HALCON allows only the usage of the number of another HALCON window as the father window of the new window; otherwise it allows also the usage of IDs of operating system windows as the father window. This control mode is only relevant for windows of type 'WIN32-Window', 'X-Window' and 'Cocoa'.


(For program development)

Checks the consistency of chords (this may lead to a notable speed reduction of routines).


Normally, if a list of objects shall be canceled by using clear_objclear_objClearObjClearObjClearObjclear_obj, an exception will be raised, in case individual objects do not or no longer exist. If the 'clear'"clear""clear""clear""clear""clear" mode is activated, such objects will be ignored.


(For program development)

Checks the memory blocks freed by the HALCON memory management on consistency and overwriting of memory borders.


Activates all control modes.


Deactivates all control modes.


Default settings: ['give_error','database']

Execution Information


CheckCheckCheckCheckcheckcheck (input_control)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Desired control mode.

Default value: 'default' "default" "default" "default" "default" "default"

List of values: 'all'"all""all""all""all""all", 'clear'"clear""clear""clear""clear""clear", 'color'"color""color""color""color""color", 'data'"data""data""data""data""data", 'database'"database""database""database""database""database", 'default'"default""default""default""default""default", 'father'"father""father""father""father""father", 'give_error'"give_error""give_error""give_error""give_error""give_error", 'interface'"interface""interface""interface""interface""interface", 'memory'"memory""memory""memory""memory""memory", 'none'"none""none""none""none""none", 'region'"region""region""region""region""region", 'text'"text""text""text""text""text"


The operator set_checkset_checkSetCheckSetCheckSetCheckset_check returns the value TRUE, if the parameters are correct. Otherwise an exception will be raised.

See also

get_checkget_checkGetCheckGetCheckGetCheckget_check, set_colorset_colorSetColorSetColorSetColorset_color, set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb, set_hsiset_hsiSetHsiSetHsiSetHsiset_hsi, write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string