Attributes (Lepton EDA Scheme Reference Manual 1.9.18)

Next: Coordinate system, Previous: Component objects, Up: Schematic Document Model [Contents][Index]

### 1.4 Attributes

A Lepton user is able to annotate schematic elements with additional data, such as footprints for components or net names for nets. This is carried out using attributes.

An attribute is text `object` which contains a text string in the form ‘`name=value`’. Currently, the restrictions on attribute format that are enforced by the API are:

- Attribute names:
  1. must contain at least one character;
  2. must not contain a ‘`=`’ character (Unicode `U+003D`);
  3. must not end with a space (‘`` ’, Unicode `U+0020`).
- Attribute values:
  1. must contain at least one character;
  2. must not begin with a space (‘`` ’, Unicode `U+0020`).

Note: Due to assumptions made by some Lepton and gEDA tools, it is strongly recommended that you use attribute names which contain only lower-case Latin characters, decimal digits, full stops ‘`.`’ (`U+002E`), and hyphens ‘`-`’ (`U+002D`).

There are two types of attribute:

Attached attributes are attribute text `object`s that are linked to another `object`. To attach an attribute to another schematic element, both `object`s must be part of the same component or part of the same `object`. For example, a ‘`netname=name`’ attribute attached to a net `object` can be used to give that net a specific name in netlist output, such as ‘`VCC`’ or ‘`GND`’.

Floating attributes are attribute text `object`s that are not linked to another `object`. These attributes affect the schematic or symbol that they’re part of as a whole. For example, a floating ‘`documentation=url`’ attribute in a symbol tells lepton-schematic’s Help → Component Documentation command how to find the component’s data sheet.

Next: Coordinate system, Previous: Component objects, Up: Schematic Document Model [Contents][Index]