Stratal CAD

Block attributes

Help centre · Drawing and editing

Attributes are text fields inside a block, such as a door number or part number, with a value of their own on each reference. You can edit them, move them per reference and extract them to a spreadsheet file.

Before you start

Steps: add attributes to a block

  1. Click Insert > Attributes > ATTDEF (or type ATTDEF, alias ATT).
  2. At "Current modes: Invisible=N Constant=N Preset=N Multiline=N. Enter a mode to change, or Enter when done" type a mode to switch it, then press Enter.
  3. Type the tag ("Enter attribute tag name"), for example DOOR_NO. Tags cannot contain spaces.
  4. Type the prompt shown on insertion ("Enter attribute prompt <DOOR_NO>") and the default value ("Enter default attribute value <none>").
  5. Click the start point of the text and give the height and rotation. For a multiline attribute, give the width its lines wrap at (0 for no wrapping).
  6. Repeat for each attribute, then select the attribute definitions with the other objects when you define the block with -BLOCK.

Attribute modes

Mode What it does
Invisible The value is not drawn or plotted, but it is extracted.
Constant Every reference shows the default; it cannot be changed per reference.
Preset The default is used without asking on insertion.
Multiline The value can have several lines; on the command line \P starts a new line. Lines hang down from the attribute's position.

Steps: change attribute values

  1. Select a reference and edit its values in the Properties panel, or
  2. Run -ATTEDIT (-ATE). At "Edit attributes one at a time? [Yes/No/Position] <Yes>":
    • Yes: select a reference, type a tag at "Enter tag of the attribute to change (Enter ends)", then the new value.
    • No: global replace. Give a block name pattern and a tag pattern (* for all), then "Enter string to change" and "Enter new string <delete it>".
    • Position: select a reference, give a tag, then click where the value goes, or choose Height, Angle or Style to set the text height, the rotation in degrees or a text style on that reference only.

A selected reference also shows a grip at each visible value. Drag it, or click it and then click where it goes, to move that value on this reference only. It is one undo step.

Steps: update references after the block's attributes change

  1. Edit the block and add, remove or change attribute definitions.
  2. Click Insert > Attributes > ATTSYNC. At "Enter an option [Name/Select] <Select>" pick a reference, or type N and the block's name.
  3. Values are kept by tag, new tags get their defaults, values of tags the block no longer has are dropped, and values moved on a reference go back to the definition's place. References nested in other blocks and on layout sheets are included. It is one undo step.

Renaming a tag

-BATTMAN: type the block name, then List its attributes or REName a tag ("Enter the tag to rename", "Enter the new tag"). Every reference keeps its value, place, height and angle under the new tag.

Extracting attributes

  1. Click ATTEXTRACT (under ATTSYNC's arrow), or Extract… in the Blocks panel.
  2. At "Enter block name specification <*>" press Enter for every block, or type a pattern.
  3. At "Enter the CSV or XLSX file to write" type a file name ending in .csv or .xlsx.

The file has one row per reference with its ID, block, layer, position, rotation, scales, one column per tag, and the block's properties. CSV is UTF-8, comma separated, quoted where needed. The panel's Extract… writes CSV.

Block description and properties

Block Properties… in the Blocks panel (or -BLOCKPROPS: Description, Set, Remove, Annotative, List) gives a block a description and named properties such as Manufacturer or Part number. They are kept in the drawing, shown under the panel's list and extracted with the attributes. Annotative makes new references of the block annotative. Each change is one undo step.

Example

Make a door tag block with attributes DOOR_NO (prompt "Door number") and FIRE (default FD30, Preset). Insert it at each door, typing D01, D02 and so on. Then run ATTEXTRACT to doors.xlsx for the door schedule.

Tips and common mistakes

Troubleshooting

Message or symptom What it means and what to do
"Attribute TAG is constant; change it in the block definition." Edit the block, or make the attribute non-constant and run ATTSYNC.
"Block "NAME" has no attribute TAG." Check the tag; -BATTMAN List shows them.
"Block "NAME" has no attributes to synchronise." The block has no attribute definitions.
"The reference has a zero scale; its attributes cannot be changed." Fix the reference's scale first.
"The file was not written: ..." Check the folder exists and the file is not open in another program.

Related

Related

Still stuck? Open a support ticket or use Help, then Contact support in Stratal CAD.