Dimensions InDesign
Script for Adobe InDesign
Latest update 12/6/2023, version 6.7
Specify dimensions and other properties of selected elements.
- Element dimensions, each selected or combined
- Measure selected text
- Distance between elements
- Includes scale option
- Corner radius
- Corner and rotation angles
- Save and restore all settings
- User-configurable localization
For the Illustrator version of this script, see Dimensions Illustrator.
How-to Videos
How to use the script
The interface has three sections. The first is four tabs, each a specific type of measurement. The second section is Lines and Text. The last section is Settings, to save and restore options. 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.
Tab 1: Dimensions
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.
Tab 2: Distance
A measure of distance is available when two elements are selected.
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 — of the two elements selected, the element most left on the page is selection 1, and the element most right on the page 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
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
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 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
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
Options that apply to all measurement types. If either Lines or Text are unchecked, they are not drawn.
Lines
Stroke — 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 alter the appearance of 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 its default values.
Experiment with values to get the preferred appearance of each arrowhead. See the example below, Simple arrowhead set to 20 degrees angle (the default), and again set to 45 degrees.
Text
Display measurements as — the measurement units (inches, points, mm, etc.) that appear in text labels. Angle ignores this option, as angles are always expressed in degrees.
Style — how the measurement units are expressed. For example, Feet & Inches may display 6 ft 7 in, 6 ft. 7 in., 6 feet 7 inches, or 6' 7". The choices vary depending on the measurement units selected. There is also the choice “None” to omit any indication of the measurement units. However, to keep feet and inches from crashing together, a dash is inserted between them. Angle ignores this option.
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 appear in text labels when values are not whole numbers. 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/Font — When the paragraph style is set to [Create 'Dimensions'], the button to the right becomes Define. In the list of paragraph styles there is also the choice [None]. When selected, the button to the right becomes Font. For any other paragraph style selected, the button is disabled. When active, the button opens a new window to set the font name, size, and swatch. When the paragraph style choice is [Create 'Dimensions'], the values are applied to the paragraph style created and used to style text labels. When the paragraph style choice is [None], the values are assigned directly to each text label, and none are linked to any paragraph style.
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.
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].
Language
By default the script language is US English, which does not require further download or configuration. To have the script interface display other languages, choose from the available languages below. Download and copy the .i18n file to the script folder alongside the script. When launched, the script detects the language file and displays interface text in that language. If your language is not listed, download the English file and translate it. The file is plain text formatted as JSON, containing interface text in English, and a second value for its translation, which for the English file is the identical text. Copy the file and rename it to replace “en” with the relevant code for your language, then edit the file to change each line’s second value to the translation in your language. For more detailed instructions of how to edit and install i18n files, see How to Localize Scripts.
English: dimensions-indesign-en-i18n.zip
German: dimensions-indesign-de-i18n.zip
Italian: dimensions-indesign-it-i18n.zip
FREE 30 DAY TRIAL
Single-user perpetual license
Pay once, no subscription, use forever
Change log: dimensions-indesign.txt
For help installing scripts, see How to Install and Use Scripts in Adobe Creative Cloud Applications.
IMPORTANT: scripts are developed for the latest Adobe Creative Cloud applications. Many scripts work in CC 2018 and later, even some as far back as CS6, but may not perform as expected, or run at all, when used in versions prior to 2018. Photoshop features Select Subject and Preserve Details 2.0 definitely fail prior to CC 2018 (version 19) as the features do not exist in earlier versions. For best results use the latest versions of Adobe Creative Cloud applications.
IMPORTANT: by downloading any of the scripts on this page you agree that the software is provided without any warranty, express or implied. USE AT YOUR OWN RISK. Always make backups of important data.
IMPORTANT: fees paid for software products are the purchase of a non-exclusive license to use the software product and do not grant the purchaser any degree of ownership of the software code. Author of the intellectual property and copyright holder William Campbell retains 100% ownership of all code used in all software products regardless of the inspiration for the software product design or functionality.