Adding Objects to the (standard) Library
You can use JSON to create the following objects and add them into the (standard) library.
This ensures they are available to use every time SIS Desktop 9 is started:
- Pens
- Brushes
- Colour-sets
- Feature Tables
When the code defining the object has been created, place the file with the extension .JSON in the Libraries folder within the folder containing Cadcorp.SIS.exe. This is normally:
C:\Program Files\Cadcorp SIS Desktop 9\Libraries

A custom pen can either be created from a new JSON file or an existing Pen definition can be copied and edited in Notepad or a JSON editor.
To copy a JSON definition select Clipboard > Copy as JSON and paste the JSON into the editor.
The JSON for this pen would be:
{"Pen":{"Colour":{"RGBA":[0,255,0,0]},"Width":100,"LineCap":"Round","LineJoin":"Round"}}
If for example you want a red pen of 2mm width with a degree of transparency (in the range 0 to 255) change this JSON as shown in red below:
{"Pen":{"Colour":{"RGBA":[255,0,0,100]},"Width":200,"LineCap":"Round","LineJoin":"Round"}}
The position of the 255 and 0 values changes the colour to red, the 100 value sets a degree of transparency and the 200 value sets the pen width to 2mm.
Copy the modified JSON and select Clipboard > Paste.
The preview will now change to:

{
"Brushes": [
{
"Name": "MyBrush",
"Object": {
"Brush": {
"Style": "Solid",
"Colour": {
"RGBA": [
0,
255,
0,
59
]
},
"BackgroundColour": {
"RGBA": [
255,
255,
0,
255
]
}
}
}
}
]
}
The above JSON defines a Brush named "MyBrush" as shown below:

{
"Coloursets": [
{
"Name": "MyColourset",
"Object": {
"Colourset": {
"Blend": true,
"ValueColourPairs": [
{
"Value": "NoData",
"Colour": {
"HSL": [
0,
240,
15
]
}
},
{
"Value": 0,
"Colour": {
"HSL": [
0,
240,
180
]
}
},
{
"Value": 100,
"Colour": {
"HSL": [
53,
240,
160
]
}
},
{
"Value": 500,
"Colour": {
"HSL": [
106,
240,
140
]
}
},
{
"Value": 1000,
"Colour": {
"HSL": [
160,
240,
120
]
}
}
]
}
}
}
]
}

The above JSON defines a Feature Table named "MyFeatureTable" as shown below: