# Dimensioning in AutoCAD: DIMLINEAR

> How AutoCAD's DIMLINEAR (DLI) dimensions, prompt by prompt: two origins or an object, then the line, set horizontal or vertical. Try it free in your browser.

DIMLINEAR measures the distance between two points along X or along Y and draws it as a dimension: two extension lines, a dimension line with its arrowheads, and the measurement above it. You give the first and the second extension line origins, then the dimension line's location, and where you place it chooses the direction, as in AutoCAD: above or below the two points it measures horizontally, beside them vertically. Press Enter at the first prompt instead and pick a line, an arc, a polyline segment or a circle: its two ends, or the circle's diameter, are the origins. The command line then says the measurement, and the command ends.

The dimension is drawn in the current dimension style, ISO-25 in a new drawing: a comma for decimals and no trailing zeros, as AutoCAD's metric drawings write it. `DIMHORIZONTAL`, `DIMVERTICAL` and `DIMROTATED`, typed only, are DIMLINEAR held to one direction.

- **Command:** `DIMLINEAR`
- **Aliases:** `DIMLIN`, `DLI`
- **Panel:** [Annotate](https://mellowcad.com/docs/commands.md#annotate)
- **Try it:** [Open the editor](/draw), type `DLI` and press Enter.

## At the command line

The engine draws it and writes its history as you would type it: the prompts in AutoCAD 2027's order, with the same option letters.

A rectangle dimensioned twice: its top edge by its two corners, its right edge by Enter and a pick on it.

```text
Command: DIMLINEAR
Specify first extension line origin or <select object>:
Specify second extension line origin:
Non-associative dimension created.
Specify dimension line location or [Text/Angle/Horizontal/Vertical/Rotated]:
Dimension text = 100
Command: DIMLINEAR
Specify first extension line origin or <select object>:
Select object to dimension:
Specify dimension line location or [Text/Angle/Horizontal/Vertical/Rotated]:
Dimension text = 60
```

## Options

### `Text` (`T`)

Asks for the text to write instead of the measurement, which it offers as the default: Enter keeps the measurement. In what you type, `<>` stands for the measurement, so `<> mm` writes it followed by its unit.

### `Angle` (`A`)

Asks for the angle of the text, which is then drawn at that angle instead of along the dimension line. 0 puts it back along the line.

### `Horizontal` (`H`)

Measures along X wherever you place the dimension line, which stays horizontal; the prompt then offers only `Text` and `Angle`.

### `Vertical` (`V`)

Measures along Y wherever you place the dimension line, which stays vertical.

### `Rotated` (`R`)

Asks for the angle of the dimension line, `0` by default, and measures the distance between the origins along it. On a slanted edge, its own angle gives its length, as [`DIMALIGNED`](https://mellowcad.com/docs/commands/dimaligned.md) does.

## What it does not do yet

Mtext: a dimension's text is one line, set with `Text` at the command line, never in the text editor. With an angle set by `Angle`, AutoCAD centres the text on the dimension line; here it stays above it, as without one. A dimension is not associative: it does not follow the object it measures.

[What it does and still lacks, in detail (in English)](https://github.com/ovelilla/mellowcad/blob/main/docs/coverage/dimensions.md#dimlinear--dimlin--dli--es-acolineal--acolin--dimlin--pt-br-cotalinear--cli--dimlin)

## Questions

### What is the shortcut for DIMLINEAR in AutoCAD?

`DLI`, or `DIMLIN`, then Enter or Space. The full name works too, and `_DIMLINEAR` in any language of AutoCAD.

### What are the dimension commands in AutoCAD?

`DIMLINEAR` for horizontal and vertical distances, [`DIMALIGNED`](https://mellowcad.com/docs/commands/dimaligned.md) for a distance along a slanted edge, [`DIMRADIUS`](https://mellowcad.com/docs/commands/dimradius.md) and [`DIMDIAMETER`](https://mellowcad.com/docs/commands/dimdiameter.md) for arcs and circles, [`DIMANGULAR`](https://mellowcad.com/docs/commands/dimangular.md) for angles, [`DIMCONTINUE`](https://mellowcad.com/docs/commands/dimcontinue.md) and [`DIMBASELINE`](https://mellowcad.com/docs/commands/dimbaseline.md) for chains, `DIMSPACE` to even out their spacing and [`DIMSTYLE`](https://mellowcad.com/docs/commands/dimstyle.md) for how they look. AutoCAD's DIM, which makes any kind from one prompt, and QDIM, which dimensions many objects at once, are not in MellowCAD yet.

### Why doesn't the dimension follow the object when I change it?

MellowCAD's dimensions are not associative yet, as `Non-associative dimension created.` says: a dimension keeps the points it was given. Stretch them together: catch the end you move and the dimension's origin there in one `STRETCH` crossing window, and the measurement is worked out again; or drag the origin's grip to its new place.

### How do I change the size of the dimension text and arrows?

In the dimension style, as in AutoCAD: [`DIMSTYLE`](https://mellowcad.com/docs/commands/dimstyle.md) (`D`) opens the dimension styles, in the Styles palette here where AutoCAD has the Dimension Style Manager. The current style's text height, arrow size, overall scale and decimals are set there, and every dimension in that style follows.

## Related commands

- [DIMALIGNED in AutoCAD](https://mellowcad.com/docs/commands/dimaligned.md)
- [DIMCONTINUE in AutoCAD](https://mellowcad.com/docs/commands/dimcontinue.md)
- [DIMBASELINE in AutoCAD](https://mellowcad.com/docs/commands/dimbaseline.md)
- [DIMRADIUS in AutoCAD](https://mellowcad.com/docs/commands/dimradius.md)
- [DIMSTYLE in AutoCAD](https://mellowcad.com/docs/commands/dimstyle.md)
