Skip to content

read_component_modelReadComponentModelReadComponentModelread_component_modelT_read_component_model🔗

Short description🔗

read_component_modelReadComponentModelReadComponentModelread_component_modelT_read_component_model — Read a component model from a file.

Warning🔗

read_component_modelReadComponentModel is obsolete and is only provided for reasons of backward compatibility. The operator will be removed with HALCON 26.11.

Signature🔗

read_component_model( filename.read FileName, out component_model ComponentModelID )void ReadComponentModel( const HTuple& FileName, HTuple* ComponentModelID )static void HOperatorSet.ReadComponentModel( HTuple fileName, out HTuple componentModelID )def read_component_model( file_name: str ) -> HHandle

Herror T_read_component_model( const Htuple FileName, Htuple* ComponentModelID )

void HComponentModel::HComponentModel( const HString& FileName )

void HComponentModel::HComponentModel( const char* FileName )

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

public HComponentModel( string fileName )

void HComponentModel::ReadComponentModel( const HString& FileName )

void HComponentModel::ReadComponentModel( const char* FileName )

void HComponentModel::ReadComponentModel( const wchar_t* FileName ) (Windows only)

void HComponentModel.ReadComponentModel( string fileName )

Description🔗

The operator read_component_modelReadComponentModel reads a component model, which has been written with write_component_modelWriteComponentModel, from the file FileNamefileNamefile_name and returns it in ComponentModelIDcomponentModelIDcomponent_model_id. The default HALCON file extension for the component model is 'cbm'.

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*)

File name.

File extension: .cbm

ComponentModelIDcomponentModelIDcomponent_model_id (output_control) component_model → (handle)HTuple (HHandle)HComponentModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the component model.

Result🔗

If the file name is valid, the operator read_component_modelReadComponentModel returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Module🔗

Matching