Next: , Previous: , Up: The 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:

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 objects that are linked to another object. To attach an attribute to another schematic element, both objects 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 objects 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: The Schematic Document Model   [Contents][Index]