pyplot.insert_qr_code - pytha-3d-cad/pytha-lua-api GitHub Wiki
Inserts a QR code on one or more plot sheets.
pyplot.insert_qr_code(sheet, text [, options])
| Parameter | Type | Description |
|---|---|---|
sheet |
element_handle or { element_handle* } |
Element handle to one or more plot sheets |
text |
string |
The text encoded in the QR code |
options |
table (optional) |
Placement and size options |
Return value
| Type | Description |
|---|---|
{ element_handle* } or nil |
A table containing the created bar code detail handles. nil if operation failed |
options table
The options table can contain one or more of the following keys:
| Property | Type | Description |
|---|---|---|
size |
{number, number} |
Width and height of the QR code on the plot sheet |
position |
{number, number} |
Origin on the sheet |
angle |
number |
Rotation angle |
Example:
local codes = pyplot.insert_qr_code(sheet, "https://www.example.com", {
position = {180, 20},
size = {25, 25}
})
Remarks:
The function inserts one QR code object on each target sheet.
If size is omitted, the default QR code size from the current plot settings is used.
The QR code text must not be empty.
The returned handles are plot detail handles.
Version Support:
Minimum PYTHA Version: V26