Product Logo

CNS Barcode

Scan and Generate Barcodes

Functions

CNSBC_ScanImage

NameCNSBC_ScanImage
Description

This function will scan an image for barcodes and process them according to the specified profile. The image can be a stored or by reference container, or it can be a path to an image file on the hard drive. If you specify a path to an image on the hard drive, it must be in the PNG or JPEG format. For other formats, insert the image into a container field first and specify the container. If the ProfileName parameter is not specified, the function will return the data from the barcode in the image, otherwise, it will use the action defined in the profile. When running under FileMaker Server, the ProfileName parameter is ignored and the function will always return the data from the barcode in the image.

Return TypeText
FormatCNSBC_ScanImage ( Image ; ProfileName )
Required Parameters
Image

This is the image to scan. You can specify a stored or by reference container object, or you can specify the path to an image file.

Optional Parameters
ProfileName

If specified, the function will look to the profile to see what action to take after scanning the barcode. If this parameter is not specified, the function will return the data found in the barcode. This parameter is ignored when running under FileMaker Server.

Examples
Example 1

This will scan an image in the MyImage field and if it finds a barcode in the image, it will return the data from that barcode.

CNSBC_ScanImage( MyDB::MyImage )
Example 2

This will scan the image on the hard drive and if it finds a barcode in the image, it will return the data from that barcode.

CNSBC_ScanImage( "/somefolder/someimage.jpg" )
Example 3

This will scan the image from the container field and if it finds a barcode, it will use the action defined in the MyProfile profile for processing the data from the barcode.

CNSBC_ScanImage( MyDB::MyImage ; "MyProfile" )