Dimensions InDesign

Script for Adobe InDesign
Latest update 9/27/2021, version 2.3

Specify dimensions and other properties of selected elements.

For the Illustrator version of this script, see Dimensions Illustrator

NEW as of version 2.3: configure arrowheads; save settings.

NEW as of version 2.1: new arrowhead options circle and slash.

NEW as of version 2.0: extension lines option to extend into element; options to draw lines or text or suppress either; set paragraph style swatch; text frames now auto-sizing.

NEW as of version 1.1: added choice of arrowhead and decimal mark.

  • Element dimensions, each selected or combined
  • Measure selected text
  • Distance between elements
  • Includes scale option
  • Corner radius
  • Corner and rotation angles
Dimensions InDesign screen
Download
Dimensions InDesign

You decide. Reward the author an
amount the solution is worth to you.

How-to Video

How to use the script

The interface has two sections. The first is four tabs, each a specific type of measurement. The second section is Lines and Text. Select the tab for the type of measurement to add, and set the desired options. Click the OK button to proceed, or Cancel to exit the script.

The measurement units (inches, points, mm, etc.) used for text labels comes from the document measurement units, which may differ in horizontal and vertical directions. Horizontal dimensions and distance match the horizontal ruler, and vertical dimensions and distance match the vertical ruler. Corner radius uses the horizontal ruler. To change the measurement units used in text labels, change the document measurement units. Angle ignores document measurement units, as angles are always measured in degrees.

Each time the script runs, the current options are preserved, and the next time, options are restored to the last values used.

Tab 1: Dimensions

Dimensions InDesign tab 1

Selection/Each selected — this option changes depending on whether one element is selected, or multiple elements are selected. For a single element, dimensions are added. When multiple elements are selected, independent dimensions are added to each element.

All combined — disabled when one element is selected. When multiple elements are selected, dimensions are added to the overall boundary of all elements selected.

Position — the edges of the element or elements to which dimensions are added. Click the All checkbox to toggle all positions on or off. At least one position must be enabled.

Include stroke — normally dimensions are the boundaries of the element without its stroke. Enable this option to include the element’s stroke width.

Rotate with selection — if the element has a rotation angle set in the InDesign interface, and this option is enabled, the dimensions are rotated to match the element’s rotation angle. If disabled, dimensions are the rectangular boundary of the rotated element. This option does not apply to selected text, and the checkbox is disabled.

Extension lines, Offset, and Layer — see the section All tabs.

Extend into element — when enabled, the extension lines offset is set to zero and disabled, and extension lines double in the length specified. The original half is outside the element as usual, and the additional half extends into the element. This option creates cross marks at the element corners, as shown below.

Dimensions InDesign marks extended into element

Tab 2: Distance

A measure of distance is available when two elements are selected.

Dimensions InDesign tab 2

Horizontal/Vertical — the choice to add a horizontal or vertical measure of distance.

Position — the edge to which the distance is added. For horizontal measurements, the choice is top or bottom. For vertical measurements, the choice is left or right. When either element is set to Center, this option only applies to the text position.

Selection 1/Selection 2 — the order in which two elements are selected in the layout before launching the script determines which element is selection 1, and which is selection 2. For each selection, there is the choice of which edge, or center, to measure from one element to the other. For horizontal measurements, the choices are left, right, or center. For vertical measurements, the choices are top, bottom, or center. The dimension line is positioned center of the element set to center, or selection 1 when both are set to center.

Include stroke — the option is available for each element selected. Normally the distance does not consider either element’s stroke. Enable this option to include one or the other, or both, element’s stroke width. When either element is measured to center, stroke is not a consideration, so the option is disabled.

Extension lines, Offset, and Layer — see the section All tabs.

Tab 3: Corner radius

Dimensions InDesign tab 3

Corner radius only applies to rectangular elements that have rounded corners. For elements not rectangular, or with square corners, this measurement type has no effect.

Corners — the corners to which radius values are added. Click the All checkbox to toggle all corners on or off. At least one corner must be enabled. When multiple elements are selected, corner radius is added to each element.

Pointers — enable to add a line from the text label to the rounded corner. When enabled, the length of the pointer may be set. Select the measurement units in the drop-down list.

Extension lines, Offset, and Layer — see the section All tabs.

Prefix — a character, or characters, that appear before the corner radius value. Default is the uppercase letter “R” without a space. This results in corner radius labels such as “R0.125 in,” for example. Add a space if desired, or use any other character, or characters.

Tab 4: Angle

Dimensions InDesign tab 4

Corner angle/Rotation angle — the choice to specify either the angle of each corner of the selected elements, or specify the elements’ rotation angle set in the InDesign interface. For simple elements that are rotated, in many cases the result is identical. More complex shapes differ. When multiple elements are selected, angles are added to each element.

Corners — the corners to which angle values are added. Click the All checkbox to toggle all corners on or off. At least one corner must be enabled. When multiple elements are selected, angles are added to each element.

Extension lines, Offset, and Layer — see the section All tabs.

When adding Corner angle measurements to elements of many points, the result is every point has its angle specified. Polygon elements such as a starburst take time, and the result may be more than desired. Or exactly as desired. Just be aware.

All tabs

Dimensions InDesign all tabs

Options that apply to all measurement types. Although these options appear identical on the script interface, their values are unique among each tab. For example, extension line length and offset for dimensions may differ from distance, corner radius, and angle.

Extension Lines — enable to include extension lines at each end of the measurement line. When enabled, the length of extension lines may be set. Select the measurement units in the drop-down list.

Offset — the distance from the element that measurements are placed. Select the measurement units in the drop-down list. When Extension lines are enabled, the offset is from the element to the extension lines, and the measurement line is offset from that half the length of the extension lines, to center it within them. When extension lines are disabled, the offset is the distance from the element to the measurement line, not considering arrowheads.

Layer — the layer to which measurements are added. The list defaults to a layer named ‘Dimensions.’ If the layer does not exist, the choice [Create 'Dimensions'] appears in the drop-down list. This choice creates the layer.

The layer option is repeated on each tab, but its value is not shared among tabs. Meaning each measurement type may be drawn to a different layer, if desired. Doing so only requires the layers be created beforehand, so each may be selected in the tab’s Layer drop-down list.

Section 2: Lines and Text

Dimensions InDesign Lines and Text

Options that apply to all measurement types. If either Lines or Text are unchecked, they are not drawn.

Lines

Stroke weight — the width of strokes used to draw measurement lines, extension lines, and pointer lines for corner radius. Select the measurement units in the drop-down list.

Arrowheads — choose None, or choose from the four available options: Circle, Simple, Slash, or Triangle to include arrowheads at each end of the measurement lines. Arrowheads are added as space permits. For dimension lines of less length than the space required, arrowheads are not added.

Swatch — the swatch used to color the lines. The list defaults to a swatch named ‘Dimensions.’ If the swatch does not exist, the choice [Create 'Dimensions'] appears in the drop-down list. This choice creates the swatch.

Configure Arrowheads

When the Arrowheads drop-down-list is open, at the bottom is the choice Configure. Selecting this opens a new window to define the size and appearance of arrowheads.

Dimensions InDesign Arrowheads drop-down list
Dimensions InDesign Configure Arrowheads

For each of the four arrowhead styles, there are three variables that determine each arrowhead’s appearance (with the exception of Circle, which has only two variables).

The size of each arrowhead is its multiplier times the line stroke weight, but not less than the minimum, which is the minimum size in points. For Simple and Triangle, the angle is degrees from the measurement line. Slash angle is degrees from extension line. Angle does not apply to Circle arrowheads. Also beside each row of inputs is a button Default, which restores the corresponding arrowhead to the default values.

Experiment with values to get the preferred appearance of each arrowhead style. See example below, Simple arrowhead set to 20 degrees angle (the default), and again set to 45 degrees.

Dimensions InDesign Arrowhead Angle Example

Text

Offset — the distance from the measurement line to the text label for the measurement value. Select the measurement units in the drop-down list.

Scale — a divisor that alters the value of text labels, for layouts not built to actual size. Set as desired, or use 1 / 1 for actual size.

Decimal mark — enter the desired character to separate the integer portion from the fractional portion of values in text labels, typically a period (dot, point), or comma.

Decimal places — the number of decimal places that values use in text labels. Angle values are limited to two decimal places, or less if set lower by this option.

Paragraph style — the paragraph style used to format the text label. The list defaults to a paragraph style named ‘Dimensions.’ If the style does not exist, the choice [Create 'Dimensions'] appears in the drop-down list. This choice creates the paragraph style.

Define — available when paragraph style is set to [Create 'Dimensions']. The button opens a new window to set the font name, size, and swatch applied to the paragraph style created and used to style text labels. For long font lists, use the input field Filter font names to narrow the list to a specific name. Select the desired font in the list. Lower, enter the desired font size in points, and choose the desired swatch from the drop-down list. The list defaults to a swatch named ‘Dimensions.’ If the swatch does not exist, the choice [Create 'Dimensions'] appears in the drop-down list. This choice creates the swatch. Click OK when the font and swatch are set as desired, or Cancel to ignore any changes.

Dimensions InDesign define paragraph style

Section 3: Settings

The current options may be saved and restored later. Select from the Load drop-down list to choose saved settings, and the current options are updated. Click the Delete button, and the saved settings selected in the Load drop-down list are permanently removed. Click the Save button, provide a name for the settings, and the current options are preserved. If the name already exists, the user may choose to replace the saved settings. Or click the checkbox Replace settings, and choose the settings to replace.

The script provides default saved settings named [Default]. These settings cannot be deleted but may be updated to the current values. Save settings, click the checkbox Replace settings, and choose [Default].

Each time processing begins, the current options are preserved, and the next time the script is launched, options are restored to the last values used.

Download
Dimensions InDesign

License details included in download

For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.

IMPORTANT: by downloading the script you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.