Add Layout Scale Bar
add_layout_scalebarAdd a scale bar to a QGIS print layout linked to a specified map item. Configure position, size, and style including single box, double box, or line ticks.
Instructions
Add a scale bar to a print layout, linked to a map item. style e.g. 'Single Box', 'Double Box', 'Line Ticks Up', 'Numeric'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"layout_name": "<layout_name>"
},
"name": "add_layout_scalebar"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| style | No | Single Box | |
| width | No | ||
| height | No | ||
| layout_name | Yes | ||
| map_item_id | No |