3.9. Blocks and Attributes
A block is a named group of entities stored once in the drawing and
placed any number of times as a block reference (an INSERT). Moving
or editing the definition updates every reference at once, which makes blocks
the right tool for repeated symbols — manholes, trees, north arrows, title
blocks, standard details.
Blocks live in the drawing they are defined in. They survive a save to
.iqz, .dxf and .dwg, and can be imported from another drawing
through the Block Manager.
3.9.1. Creating a Block
Draw or select the entities that make up the symbol.
Type
BLOCK(aliasB) and press Enter to confirm the selection.Click the base point — the handle the block is inserted by, and the point the reference is rotated and scaled about.
Type a name and press Enter.
The selected entities are copied into the definition (with their coordinates made relative to the base point), removed from model space, and replaced by a single block reference at the base point. Nothing is lost: exploding the reference brings the geometry back.
Note
Block names are unique per drawing and the check is case-insensitive. If the name is already taken, the command reports it and asks again rather than overwriting the existing definition.
3.9.2. Inserting a Block
INSERT <name>(aliasINS) starts a rubber-band insert of that block; click to place it.INSERTwith no argument lists the defined blocks and asks for a name.BLOCKS(aliasBL) prints the block table — name and entity count — without inserting anything.Draw › Block Insert on the menu does the same as
INSERT.
A placed reference carries its own scale, rotation and array settings, all editable in the Object Inspector:
Property |
Meaning |
|---|---|
Block name |
The definition this reference points at. |
Scale X / Y / Z |
Independent axis scales. Negative values mirror the reference. |
Rotation |
Degrees counter-clockwise about the insertion point. |
Columns / Rows |
Rectangular array count. A reference with more than one cell is the
equivalent of AutoCAD’s |
Column / Row spacing |
Centre-to-centre distance between array cells, in drawing units. |
3.9.3. Editing a Block Definition
BEDIT <name> (alias BE) opens the block editor: the drawing area
switches to the block’s own contents, drawn about its base point at the
origin. Draw, modify and erase there exactly as in model space.
BEDIT with no argument prompts for a name; typing ? at that prompt
lists every definition with its entity count.
BCLOSE (alias BC) saves the edited definition and returns to the
drawing. Every reference to that block redraws with the new contents.
3.9.4. Block Manager
BLOCKMANAGER (alias BM) opens a dialog listing every definition in
the drawing as a rendered thumbnail, with the selected block’s details on the
right: name, origin (base point), entity count, and the number of references
placed.
Button |
Action |
|---|---|
Insert |
Closes the dialog and starts an insert of the selected block. |
New |
Starts a |
Edit |
Opens the selected block in the block editor (as |
Rename |
Renames the definition; existing references follow the new name. |
Delete |
Removes the definition. A block that still has references cannot be deleted — erase or explode them first. |
Purge Unused |
Deletes every definition with no references left in the drawing. The
same clean-up the |
Import |
Reads block definitions out of another |
3.9.5. Exploding a Block
EXPLODE replaces a selected block reference with independent copies of
the definition’s entities, transformed by the reference’s own scale and
rotation. An arrayed reference explodes to every cell. The definition
itself is untouched, so other references are unaffected.
3.9.6. Attributes
Attributes are text fields carried by a block reference — a manhole number, a pipe diameter, the fields of a title block — so that two references of the same definition can show different text.
IQcad reads and preserves attributes on import:
An ATTDEF in a block definition (the template that names the field) is staged as text carrying its attribute tag. A tag is a label, not drawable content, so ATTDEFs are not drawn when the block is inserted.
An ATTRIB on a block reference (the filled-in value) is attached to that reference and drawn with it. Attribute values move, rotate and scale with the reference, and are included in its bounding box and in the result of
EXPLODE.Attributes marked invisible are stored but not drawn.
Attribute text round-trips through DXF and DWG in both directions. IQcad has no attribute-definition command of its own: a block with attributes is authored in AutoCAD (or a compatible program) and then used here.
3.9.7. Blocks, Layers and Colours
Entities inside a definition keep the layer, colour and linetype they were
drawn with. Entities drawn on layer 0 with colour and linetype set to
ByLayer or ByBlock instead inherit from the reference — which is the
standard way to build a symbol that takes on the layer it is inserted on.
See Layers, Linetypes and Text Styles for the inheritance rules.
3.9.8. Blocks in the File Formats
Format |
Behaviour |
|---|---|
IQML ( |
Definitions and references are written in full, with attributes. |
DXF |
Written to the |
DWG |
Read and written natively, including |
PDF / SVG / image |
Flattened to their drawn geometry. |
The Drawing Utilities › Purge… command (File › Drawing Utilities) removes unreferenced definitions from the drawing, along with unused layers and styles, before a save.