I’ve created a variation on a Visio dimension line that let’s you both measure items, as well specify (and lock) how long the dimension line is! Is this a solution in search of a problem?
The Dream of a Dual-purpose Dimension Line Shape
I’ve always wanted to create a SmartShape that allowed you to either measure distances by simply dragging shape handles, or fix the length of the shape by entering text. I have a few reasons why I want this, but I’ll discuss in future articles with future downloads. For now, this might come off as a solution looking for problems.
Anyway, this dual-mode behavior can be done using two text blocks and a few Shape Data fields, but it can be kind of clunky. 1. Pick from a drop-down list whether to freely-resize the shape, or set it to a fixed length. 2. If fixed length, then type a number or length expression into another field.
I wanted something more direct, and natural, and I’ve successfully created it! By default, the 2-way Dimension (v1) shape behaves like other dimension shapes. You stretch it via shape-handles, and its text displays the length of the shape.
You can also select the shape and type text into it. This, however, doesn’t overwrite the displayed dimension text, like other dimension line shapes. Instead, you edit a second text block when you type.
If the text you type evaluates to a length–such as “3.14159”, “25.4mm”, or “5ft”, then WHAM! The shape becomes a fixed-length shape that remains the length you’ve specified. You can still move it around, and even rotate it!
Here’s an animated gif that shows the dual mode behavior:
If the text you typed doesn’t evaluate to a length, then it becomes a “supplementary note”, and remains visible, just above the length-text for the dimension.
The net result is a dimension line shape with three modes:
- A normal dimension line that displays the length that you have stretched it to.
- A normal dimension line that has an extra text block for adding notes, labels, etc.
- A fixed dimension line that stays the length that you specified
Unfortunately, I wasn’t able to completely eliminate clunkiness, though. Since Visio evaluates text as you type, the length of the 2-way Dimension can jump around wildly as you type. Imagine you want to fix the shape at 9mm in length. This is how it will go down:
- You select a 2-way dimension line
- You start typing…9
Visio interprets the 9 as 9 inches! If you are working in an unscaled drawing, this is nearly as wide as the page! - You continue typing…9m.
Now the dimension line explodes to 9 meters! Your text-editing will likely be way off the page, and you will see gray in the background. This can be disconcerting. But keep calm, carry on, and trust your typing!
- You finish up with…9mm.
The shape snaps back onto the page, and you have a rather short dimension line. That feeling of something just exploded subsides.
Okay, this is perhaps more clunky than dinking around with two or more Shape Data fields. But there is a nice workaround:
- Type mm first.
- Backspace two characters, then type the 9.
Since “mm” doesn’t evaluate as a length, the shape will interpret that as “supplemental note text”, and keep the stretched-to size of the shape intact. When you go back and add the 9, then the shape says to itself: “Oh, I have been directed to fix myself at nine millimeters!”, and it responds accordingly.
Now, if you want to set a new mm-value, you can double-click the shape, which will reveal the “9mm” text, and you can quickly edit just the number portion of the expression. The jumping around of the shape will likely be much less violent.
Note: once you’ve typed in length text, that text becomes hidden, since the dimension line is already configured to display lengths according to the options already set. Say you’ve configured the dimension line to display millimeters without units, and two decimal places. Now you type in 1/12 ft. When you’re done typing, the text you typed will be hidden, and the dimension line shape will display 25.40.
Here’s another animation showing a note, then doing the “9mm fiasco” described above. As a bonus, I show how you can actually do “length text calculations”, which is kind of cool!
The calculation feature can be pretty powerful. You could easily type 25.4mm + 1in + 2.54cm into the shape’s text. The resulting shape would indeed be 3 inches long!
“Built-in” Visio Dimension Line Shapes
Visio comes with two stencils full of dimension line shapes. You can find them via: Shapes > More Shapes > Visio Extras. The stencils are called:
- Dimensioning – Architectural
- Dimensioning- Engineering
The 2-way dimension is based off of the Engineering version of the Aligned Even master shape.
click to view full-sized image
For my book, Using Microsoft Visio 2010, I created around 40 companion videos. I’ve since uploaded them to YouTube, and you can watch 8.4 Using Visio Dimension Lines to learn how to use dimension line shapes!
Download the 2-way Dimension Line (v1)
Download “2-way Dimension Line (v1)” EbAFcbUe_1NAmw0DQf7fXxsBnbbw_kx9ZBgg_IDevYALhw – Downloaded 26 times –You should get the file: 2-way Dimension Line (v1).zip
Hi Chris,
For whatever it’s worth: yes, this is a good thing.:-)
Ole
O.K. – I have ideas…