Usage of miyako/4d-plugin-qrencode-v2/ unclear


I downloaded and installed the qrencode plugin (from to a new proof of concept project.

I am missing something when creating the parameter object I guess, cause I am failing to retrieve a barcode object. I found out about the parameters in 4d-plugin-qrencode-v2-master/qrencode/test/Project/Sources/Methods/TEST.4dm.

Here’s my code:

C_OBJECT($Barcode_o; $Barcode_Params_o)

$Barcode_Params_o:=New object
$Barcode_Params_o.format:=QR Format PNG  // highlighting seems to be wrong here – these are constants
$Barcode_Params_o.mode:=QR Mode Unicode
$Barcode_Params_o.level:=QR Correction Level L


Any hint would be highly appreciated :slight_smile:


Just copied and pasted your code:

Do you not get a picture in $Barcode_o.image ?

1 Like

Should have posted a screenshot as well; would have been pretty clear the what’s wrong…

I just now realise that for reasons that are beyond me I had an empty method called QrCode in the project. Should have been obvious to me that I am not calling the plugin’s method.

After deleting that method it (obviously…) does work.

Thanks for your fast reply, it’s highly appreciated!

Is there a way to add a logo image using the QRcode plugin?

My understanding is that the centre part of a QR code can be calculated from its surrounding blocks and the checksums on the edge.

In other words, the centre region contains “redundant” information and can be “damaged” to a certain degree. You can superimpose your logo on the QR code directly. The tolerable size depends on the error correction level.

The “swiss” example creates a normal QR code and adds a small image in the middle.

1 Like