Skip to the content.

hmBC_Generate Barcode (Info) → Status

Introduced in v18, Preemptive: yes
Parameter Type In/Out Description
Info Object Info object
Status Object Status object

Description

The command hmBC_Generate Barcode generates a barcode with the information from the Info parameter. Attributes of the Info-object:

Status returns an object with the result or possible errors:

Example

The following example creates a QR Code picture and saves it to disk:

var $vo_status; $vo_barcode : Object

$vo_barcode:=New object
$vo_barcode.text:="this is a demo text"
$vo_barcode.symbology:=hmBC_QR Code

$vo_status:=hmBC_Generate Barcode($vo_barcode)

If ($vo_status.success)
	WRITE PICTURE FILE("test.svg"; $vo_status.picture)
End if 

Result:

Result

The following example creates a GS1-128 Barcode:

var $vo_status; $vo_barcode : Object

$vo_barcode:=New object
$vo_barcode.showtext:=True
$vo_barcode.mode:=hmBC_Input_GS1 Mode
$vo_barcode.text:="[01]98898765432106[3202]012345[15]991231"
$vo_barcode.symbology:=hmBC_GS1 128

$vo_status:=hmBC_Generate Barcode($vo_barcode)

If ($vo_status.success)
	WRITE PICTURE FILE("test.svg"; $vo_status.picture)
End if 

Result:

Result