Skip to content

read_bar_code_modelReadBarCodeModelReadBarCodeModelread_bar_code_modelT_read_bar_code_model🔗

Short description🔗

read_bar_code_modelReadBarCodeModelReadBarCodeModelread_bar_code_modelT_read_bar_code_model — Read a bar code model from a file and create a new model.

Signature🔗

read_bar_code_model( filename.read FileName, out barcode BarCodeHandle )void ReadBarCodeModel( const HTuple& FileName, HTuple* BarCodeHandle )static void HOperatorSet.ReadBarCodeModel( HTuple fileName, out HTuple barCodeHandle )def read_bar_code_model( file_name: str ) -> HHandle

Herror T_read_bar_code_model( const Htuple FileName, Htuple* BarCodeHandle )

void HBarCode::HBarCode( const HString& FileName )

void HBarCode::HBarCode( const char* FileName )

void HBarCode::HBarCode( const wchar_t* FileName ) (Windows only)

public HBarCode( string fileName )

void HBarCode::ReadBarCodeModel( const HString& FileName )

void HBarCode::ReadBarCodeModel( const char* FileName )

void HBarCode::ReadBarCodeModel( const wchar_t* FileName ) (Windows only)

void HBarCode.ReadBarCodeModel( string fileName )

Description🔗

The operator read_bar_code_modelReadBarCodeModel reads the bar code model from the file FileNamefileNamefile_name and creates a new model that is an identical copy of the saved model. The parameter BarCodeHandlebarCodeHandlebar_code_handle returns the handle of the new model. The model file FileNamefileNamefile_name must have been created by the operator write_bar_code_modelWriteBarCodeModel. The default HALCON file extension for bar code model is 'bcm'.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters🔗

FileNamefileNamefile_name (input_control) filename.read → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the bar code model file.

Default: 'bar_code_model.bcm'"bar_code_model.bcm"
File extension: .bcm

BarCodeHandlebarCodeHandlebar_code_handle (output_control) barcode → (handle)HTuple (HHandle)HBarCode, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the bar code model.

Result🔗

The operator read_bar_code_modelReadBarCodeModel returns the value 2 (H_MSG_TRUE) if the named bar code file was found and correctly read. Otherwise, an exception is raised.

Combinations with other operators🔗

Combinations

Possible successors

find_bar_codeFindBarCode

Alternatives

create_bar_code_modelCreateBarCodeModel

See also

write_bar_code_modelWriteBarCodeModel, clear_bar_code_modelClearBarCodeModel

Module🔗

Bar Code