You can place arbitrary text attributes on nearly any part of the circuit by using the Attribute Properties... command (in menu Edit / Properties).

Figure 6.18

Attributes can be placed on these objects (selected at the top):

The list of attributes is shown below that. You can create a new attribute by typing its name in the "Name:" field, its value in the "Value:" field and then clicking the "Create New" button. You can delete an attribute with the "Delete" button. A selected attribute can have its value changed by typing a new value and clicking the "Update" button. An attribute's name can be changed with the "Rename" button.

Just below the name and value fields are a set of popups that control the attribute. The "Code" popup determines whether the attribute is code or pure data. This can be changed to one of the interpretive languages in Electric. When this happens, the attribute value is treated as code that is sent to that interpreter. Then, the true value of the attribute is the evaluation of that code. For example, if the value of an attribute is "3+5" and the attribute is set to be Java code, then the Java interpreter will be invoked, and the attribute will actually be "8".

You can change the type of unit by using the "Units" popup (choices are capacitance, resistance, inductance, current, voltage, or distance). See Section 7-2-2 for more on these units.

You can control the way that an attribute is displayed in the circuit by selecting the appropriate entry in the "Show:" popup. You can request that various combinations of the attribute's name and value be displayed.

The bottom part of the dialog affects the appearance of the attribute, and is only relevant if the attribute is being shown. The size of the text can be specified in relative or absolute units. The anchor-point of the text can be set. The X and Y offset of the anchor-point from the attached object can be specified. The font of the text can be chosen. The style of the text can be any combination of Italic, Bold, or Underline. You can specify the rotation of the text, in 90-degree increments. The "Invisible outside cell" requests that the attribute not be drawn when viewed farther up the hierarchy.

The "Done" button terminates this dialog. Note that there is no "Cancel" button: this dialog makes changes as they are entered.

Special Considerations

Attributes that are placed on cells or exports get inherited when the cell is instantiated. Each of these attributes is created on the instantiated node and port. It is often desirable for each inherited attribute to have unique names. If the value of a cell or export attribute has "++" in it, then the number before it will be incremented after inheritance. Similarly, a "--" indicates that the number be decremented after inheritance. This allows an inherited attribute to be unique with each inheritance.

When there are too many visible attributes, the display can become cluttered. Use the Layer Visibility... command (in menu Window) to control the text, see Section 4-5 for more on these units. Attributes on nodes are controlled by the "Node Text" checkbox; those on arcs with the "Arc Text" checkbox, etc.