Back to the Drawing Board

Text Attributes in Groups

Text attributes are text objects contained in a group whose location, text style, and other properties are defined for the group (and all instances of that group), but the actual contents of the text string are different for each instance. They are "placeholders" for the final text in the group. Text attributes can be used to display the size of a valve, the part number of an electrical component, or the name and title in an organization chart box.

When you insert a group with attributes into your drawing, a dialog appears prompting you to enter a value for each attribute. The value entered becomes the contents of the text string in the instance.

Attribute values for symbols or groups can be changed at any time using the Fill in text attributes option in the Edit object tool.

Inserting symbols with attributes into your drawing

When a symbol with attributes is inserted into your drawing, a dialog will appear asking you to fill in the values for each of the symbol’s attributes. The dialog consists of a prompt which tells you what information is needed, a text box where you enter the actual value, and a button that saves the attribute. The contents of the value text box default to the attribute’s default value. If you do not change the value in the text box the default value will be entered into your drawing. If the default value is blank, no text will be visible in the symbol. If the symbol contains multiple attributes, tapping the Next button will cause the next attribute to be displayed. When there are no more attributes to fill in the dialog will be dismissed.

Modifying attribute values

Attribute values can be modified using the Fill in text attributes option in the Edit object tool. To modify the attributes, select a symbol or group that contains attributes and tap the Fill in text attributes button in the context dialog. Each attribute value will be displayed in the context dialog as they were when the symbol or group was inserted.

Creating groups and symbols with attributes

Attributes are simple text entities that are part of a symbol or group. They are created using the Text tool like any other text object. The text string contains a special sequence of characters (markup) that identifies the text as an attribute, and defines the prompt and default values for the attribute, and the maximum number of lines that can be filled in.

The format of the attribute markup is described below.

{{prompt:default{number of lines}}}

The markup consists of three fields:

The string that is shown to the user when he is prompted to enter the value of the attribute (required).
The default value of the attribute. The attribute value text box is pre-populated with this value when the symbol is inserted. If you don't enter a new value or clear the default value, this value becomes the attribute value. The "default" field is optional; if omitted, there will be no default value.
The maximum number of lines of text that can be displayed as the attribute value. The "lines" field is optional; the default is one (1).

The attribute markup starts with two left curly brackets and ends with two right curly brackets. The prompt and default values appear between the curly brackets separated by a colon, optionally followed by the maximum number of lines enclosed in single curly brackets. The prompt and default values can contain any printable characters except colons or curly brackets, but it is generally good practice to use only letters and numbers for the prompt. If a symbol contains multiple attributes, the prompt for each must be unique within that symbol. The default value is optional however the colon is not. Here are a few examples:

{{Part #:}}
{{Name and title:{2}}}
{{Name and address:{3}}}

The prompt and default strings are single line values, however the filled-in attribute values can be any number of lines. You specify the maximum number of lines that can be filled in by entering that number enclosed in curly brackets at the end of the default field. If the line count field is omitted (or is less than 2), the filled-in attribute will be a single line.

When filling in multiple attributes in a group or symbol, the attribute prompts will appear in the order that the attributes were selected when the group was created.

When attributes are added to a group in the Select objects tool, the attribute markup will disappear and only the default value will be displayed. If there is not a default value, no text will be displayed until the attribute is filled in. If the attribute markup does not disappear when the attribute is added to the group, there is probably an error in the markup. Undo the group creation (or ungroup the group) and correct the markup syntax.

Modifying the attribute markup

The attribute markup can only be changed if the text object containing the markup is not a member of a group. If you need to change the markup of a text attribute in a group, first insert a clean instance of the group (with no attributes filled in), ungroup the group, change the markup using Edit text, and recreate the group.