Skip to content

write_component_modelWriteComponentModelWriteComponentModelwrite_component_modelT_write_component_model🔗

Short description🔗

write_component_modelWriteComponentModelWriteComponentModelwrite_component_modelT_write_component_model — Write a component model to a file.

Warning🔗

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

Signature🔗

write_component_model( component_model ComponentModelID, filename.write FileName )void WriteComponentModel( const HTuple& ComponentModelID, const HTuple& FileName )static void HOperatorSet.WriteComponentModel( HTuple componentModelID, HTuple fileName )def write_component_model( component_model_id: HHandle, file_name: str ) -> None

Herror T_write_component_model( const Htuple ComponentModelID, const Htuple FileName )

void HComponentModel::WriteComponentModel( const HString& FileName ) const

void HComponentModel::WriteComponentModel( const char* FileName ) const

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

void HComponentModel.WriteComponentModel( string fileName )

Description🔗

The operator write_component_modelWriteComponentModel writes the component model ComponentModelIDcomponentModelIDcomponent_model_id to the file FileNamefileNamefile_name. The model can be read again with read_component_modelReadComponentModel. 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.

Parameters🔗

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

Handle of the component model.

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

File name.

File extension: .cbm

Result🔗

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

Module🔗

Matching