COMPONENT
COMPONENTreferences a Symbol. Since a Symbol supports multiple Parts, it carries asub-library IDto indicate which one; for a single-Part device, the default value""is used.- A
COMPONENTcan bind manyATTRs; specific attribute behavior is defined by the tool.
Symbol Types
| Symbol Type ID | Symbol Type | Description |
|---|---|---|
| 2 | Part Symbol | Common device. |
| 17 | Block Symbol | Hierarchical symbol. |
| 18 | NetFlag Symbol | Global net symbol. |
| 19 | NetPort Symbol | Hierarchical net export symbol. |
| 20 | Sheet Symbol | Provides a reuse mechanism for schematic sheets. |
| 21 | NoneElec Symbol | Non-electrical symbol. NoneElec is a class of non-electrical primitives without PIN.Can also be used as a reuse mechanism for special icons, copyright statements, etc. NoneElec stands for None Electrical. |
| 22 | Short Symbol | Short Symbol is a special Symbol that must have two PINs.All nets connected to the PINs of the same Short Symbol are electrically shorted.For example, if net A is connected to PIN1 and net B to PIN2, A and B are the same net. |
Component Primitive
{ "type": "COMPONENT", "id": "UUID", "ticket": 1 }||
{
"partId": "e176",
"groupId": 0,
"positionX": 300,
"positionY": 200,
"rotation": 15,
"isMirror": false,
"data": {},
}|2
3
4
5
6
7
8
9
10
- type COMPONENT identifier: COMPONENT.
- id ID, unique within the file.
- ticket logical clock.
- partId sub-library ID.
- groupId group ID, cannot be 0, empty by default when none.
- zIndex Z-axis height: all non-attribute child elements are distributed within Z0 ~ Z9, e.g. Z of 23.554 means child elements are auto-distributed within 23.5540 ~ 23.5549.
- positionX position X.
- positionY position Y.
- rotation rotation angle, around
position. - isMirror whether mirrored.
- data pure data attributes: additional information for internal editor logic.
The Symbol referenced by a Component is transformed in the following order:
- Rotate counter-clockwise around the origin (0,0) by the
rotation angle. - If
isMirroris1, mirror horizontally around the Y-axis at the origin (0,0). - Translate by
position.
Or equivalently (but more cumbersome to implement):
- Translate by
position. - Rotate counter-clockwise around
positionby therotation angle. - If
isMirroris1, mirror horizontally around the Y-axis atposition.
{ "type": "ATTR", "id": "e187", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176", "key":"Device", "value":"device-uuid-1", "keyVisible":true, "valueVisible":true, "positionX":300, "positionY":200, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|2
Device uuid, consistent with the file name corresponding to the device in project.json.
{ "type": "ATTR", "id": "e188", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176", "key":"Symbol", "value":"symbol-uuid-1", "keyVisible":true, "valueVisible":true, "positionX":300, "positionY":200, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|2
An ATTR inside COMPONENT with the same name as one in the template will override it. Overriding Symbol affects the binding between the device and the symbol.
{ "type": "ATTR", "id": "e188", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176", "key":"Footprint", "value":"footprint-uuid-1", "keyVisible":true, "valueVisible":true, "positionX":300, "positionY":200, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|2
An ATTR inside COMPONENT with the same name as one in the template will override it. Overriding Footprint affects the binding between the device and the footprint.
{ "type": "ATTR", "id": "e188", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176", "key":"Designator", "value":"U1", "keyVisible":true, "valueVisible":true, "positionX":300, "positionY":200, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|2
An ATTR inside COMPONENT with the same name as one in the template will override it.
{ "type": "ATTR", "id": "e180", "ticket": 1 }||
{ "partId": "", "groupId": 0, "locked": true, "zIndex": 0.1, "parentId": "e176e5", "key":"NUMBER", "value":"1", "keyVisible":true, "valueVisible":true, "positionX":108, "positionY":804.5, "rotation":0, "color":null, "fillColor":null, "fontFamily":null, "fontSize":null, "strikeout":null, "underline":null, "italic":null, "fontWeight":null, "vAlign":0, "hAlign":2,}|2
The key to PIN attribute override lies in the parentId of ATTR. The ID has two parts, e.g. e176e5, where e176 is the COMPONENT ID and e5 is the PIN ID in the template.