Skip to main content

import

Imports various files and objects.

Parameter

An Import object.

Return value

An object containing information about what was successfully imported.

Examples

Import a variable and a label (expanded to multiple lines to improved readability):

import {
"variables": {
"My Variable": {
"value": "My Value"
}
},
"labels": {
"My Label": {
"metric": true,
"height": 108,
"width": 200,
"objs": [
{
"type": "Rect",
"x": 55,
"y": 38,
"height": 30,
"width": 30,
"fillColor": "black"
},
{
"type": "Text",
"x": 0,
"y": 0,
"text": "Hello {VARIABLE;My Variable}",
"color": "black",
"font": {
"family": "Liberation Sans",
"style": "Regular",
"height": 20
}
}
]
}
}
}

Returns:

OK {"labels":["My Label"],"variables":["My Variable"]}