BrickStore Extensions Documentation

BrickStore can be extended via JavaScript/QML based extensions.

The QML BrickStore module provides the necessary types for scripting extension in the desktop version (as well as for creating complete mobile user interfaces).


Installing an extension from a file, so that it can be used by BrickStore is covered here:

BrickStore Extension Installation

Porting old Scripts

Print scripts from old BrickStore (or BrickStock) versions are not compatible anymore and need to be ported manually. You can find a porting guide here:

Porting old BrickStore and BrickStock Print Scripts

Writing Extensions

Your best bet is to start by cloning an existing extension to get all the needed boiler plate code.

Extensions are based on QML and JavaScript. These QML types can be imported into your application or extension using the following import statement in your .qml file:

import BrickStore
import BrickLink
import QtQuick

Your root object is always Script followed by one or more child elements of type PrintingScriptAction and ExtensionScriptAction. All the other types can not be instantiated in a declarative way, but are instead provided to your extensions interface functions as parameters, or they can be dynamically created/retrieved via the global singletons BrickStore and BrickLink.

These types are available to setup and manage an extension:


Use this type to add an UI action to your extension


Use this type to add a print action to your extension


Root element of any BrickStore extension file

While the extension is active, you have acess to these types:


Core singleton managing the data transfer from and to BrickLink


This singleton represents global settings and state


This value type represents a BrickLink item category


This value type represents a BrickLink color


This type represents the BrickLink catalog database


Each instance of this type represents an open document


This value type represents a BrickLink item


This value type represents a BrickLink item type


This value type represent a lot in a document


This singleton represents the network state


This type holds the information about a BrickLink order


This value type represents a picture of a BrickLink item


This value type represents the price guide for a BrickLink item

In addition to that, printing extensions also use these types:


An instance of this type represents an active print job


An instance of this type represents the canvas of a printer page


The JavaScript environment is very similiar to a web browser, so any console.log() calls end up in BrickStore's developer console, which is available via the Extras > Developer Console menu.

This developer console also doubles as a live JavaScript console, so you can test your code snippets directly there in an interactive environment.

If you throw an Error object, the script execution will terminate and the message property of the thrown object will be shown to the user in a message box.

© 2004-2024 Robert Griebl. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. All trademarks are property of their respective owners.