bookmark_templates.cfg Sample File
The bookmark template definition file is named bookmark_templates.cfg. A
bookmark_templates.cfg file contains the following
strings: { "templates": [{
"ignore": false,
"templateName": "template name",
"templateDescription": "template description",
"assignment": "rid7"
"bookmarks": [{
"title": "Requirements",
"description": "Non-CAD Requirements",
"ignore": true,
}, {
"title": "Layouts",
"description": ""
"assignment": "rid1"
"bookmarks": [{
"title": "Layout mfg docs name",
"description": ""
"assignment": "rid5"
}
]
}, {
"title": "bookmark description",
"description": "bookmark description"
"assignment": "rid5"
"bookmarks": [{
"title": "bookmark name",
"description": "bookmark description"
"assignment": "rid6"
}
]
}
]
}
"rules": [{
"rule-id": "rid1",
"ruletype": "cadType",
"cadtype": "PCB"
}, {
"rule-id": "rid2",
"ruletype": "titleMatch",
"pattern": "*pdf"
}, {
"rule-id": "rid3",
"ruletype": "nameMatch",
"pattern": "*hugo"
}, {
"rule-id": "rid4",
"ruletype": "MFGData"
}, {
"rule-id": "rid5",
"ruletype": "FABData"
}, {
"rule-id": "rid6",
"ruletype": "Logic",
"expression": "(rid1 AND rid2) OR rid3"
}, {
"rule-id": "rid7",
"ruletype": "Parent",
"rule": "rid1"
}, {
"rule-id": "rule_Output_Gerber",
"ruletype": "Output",
"generator-id": "GERBER"
}, {
"rule-id": "ruletype_Output_OutputJob",
"ruletype": "OutputJob",
"medium": "*PDF*",
"jobfile":"*BEAGLEBONEBLACK_REV A5B*"
}
]
}
Properties
The following table lists the JSON properties in the templates section:
| JSON properties in "templates" section |
Description |
| ignore |
[Optional], Boolean, defaults to false Ignore the template or
bookmark completely. |
| templateName |
[Mandatory], The name of the template how it is displayed in
the selection |
| templateDescription |
[Optional], The description of the template to be displayed in
the tooltip |
| assignment |
[Optional], The rule used to perform the assignment into the
template root bookmark |
| bookmarks |
The array of bookmarks of its parent |
| title |
[Mandatory], the name of the bookmark. The
title of the bookmark is used as the identifier, which is a
part of the root bookmark structure. |
| description |
[Optional],The description of either the template to be
displayed or the description to be created bookmark |
| assignment |
[Optional], The rule used to perform the assignment into the
bookmark |
The following table lists the JSON properties in the rules section:
| JSON properties in the "rules" section |
Description |
| rule-id |
[Mandatory], String type. ID of the rule which is referenced in the
assignment property Only the following characters are allowed in rule-ids:
- Letter (a-z, A-Z)
- Currency symbol (such as '$')
- Connecting punctuation character (such as '_')
- Digit (0-9)
- Numeric letter (such as a Roman numeral character)
- Combining mark
- Non-spacing mark
|
| ruletype |
[Mandatory] You can use one of the following values:
- cadType: Matching the cadtype of an object
- titleMatch: Matching the title of an object.
- nameMatch: Matching the ecad name of an object.
- MFGData: Matching the Manufacturing data of an object, variant specific
(Assembly).
- FABData: Matching the Manufacturing data of an object, not variant specific
(Printed Circuit Board).
- Logic: A Boolean logic operation combining rules by their rule-id.
- Parent: Referenced rule is applied to the parent object by rule-id.
- Output: matching for Manufacturing data by the generator-id (id is defined
in the script creating it)
- OutputJob: matching the medium and job file, both need to be defined but *
to match all can be used.
|
| cadtype |
Applied on ruletype cadType:
You can use one of the following types:
- PrintedCircuitBoardAssembly
- PrintedCircuitBoard
- AltiumSchematic
- AltiumPCBProject
- AltiumBomDoc
- AltiumDraftsman
|
| pattern |
Applied on ruletype titleMatch or nameMatch A pattern matching string
which is applied on the ruleType. |
| expression |
Applied on ruletype Logic: An expression supporting AND/OR/NOT and
rule-ids |
| rule |
Applied on ruletype Parent: The ID of used rule. |
| generator-id |
[Mandatory] for ruletype Output The ID of the Scripted Manufacturing Data
generator used, supports also pattern format with. |
| medium |
[Mandatory] for ruletype OuptutJob (only for Altium) Matching the
medium in Altium, supports also pattern format with * (only * maching for all
jobfiles is also applicable) |
| jobfile |
Mandatory] for ruletype OuptutJob (only for Altium) Matching the
jobfile in Altium, supports also pattern format with * (only * maching for all
jobfiles is also applicable) |
|