Does Visio have enough Precision?

A Visio user in the Answers Forums asked about an issue with the Precision feature in Visio. He was having trouble with feet-inches vs decimal feet.

The “Precision & Units…” feature is not built into Visio, but is implemented by a right click feature in the shapesheet. It is in both the Metric and Imperial (aka US) stencils

That displays…

The feature also includes the next four “commands” in the menu.

  • Set As Page Default
  • Revert To Page Default
  • Reset Text Position
  • Extension Lines….

The Menu

It is a group of Shape Data cells, User cells and Action cells that appear in some of the dimension shapes.

I have not checked all the shapes in those categories, but most have the same cells.

The menu is relatively simple.

RowFormulaAction
1Precision && &Units…SETF(“Prop.LPrec.Invisible”,0)+DOCMD(1312)
2Set &As Page DefaultSETF(“ThePage!User.LPrec”,User.LPrecInd)+
SETF(“Prop.LPrec”,”User.LPrecVal”)+
SETF(“ThePage!User.LUnits”,User.LUnitsInd)+
SETF(“Prop.LUnits”,”User.LUnitsVal”)+
SETF(“ThePage!User.ShowUnits”,User.ShowUnitsInd)+
SETF(“Prop.ShowUnits”,”User.ShowUnitsVal”)
3&Revert To Page DefaultSETF(“Prop.LPrec”,”User.LPrecVal”)+
SETF(“Prop.LUnits”,”User.LUnitsVal”)+
SETF(“Prop.ShowUnits”,”User.ShowUnitsVal”)
4_Reset Te&xt PositionSETF(“Controls.X2″,”Scratch.X1”)+
SETF(“Controls.Y2″,”Height”)
5Extension &Lines…SETF(“Prop.LPrec.Invisible”,1)+DOCMD(1312)

basically a collection of SetF functions and DoCMD(1312)s. DOCMD(1312) is
from (https://docs.microsoft.com/en-us/office/vba/visio/concepts/docmd-docmd-commands)
visCmdFormatCustPropEdit opens the Custom Property (AKA Shape Data) window for editing.

Precision

This is a list with zero to four decimal places. The selected one is added as a string to the Format Code.

Units

which opens the Shape Data window AKA Custom Properties (for the old timers)

Extension

This is a dimension line feature. Sometimes the arrows on a dimension line connect with a physical line, sometimes they do not. The extensions are perpendicular lines to the dimension line that intersect, or comes close to physical lines.

there are control handles to control the length of the extensions and shape data to determine whether they are visible, both, start, end or none.

What does the shape show?

The text of the shape is an insert Field that shows the User cell LengthText

User cell LengthTextIF(User.LUnitsInd=1,
User.FeetInch,
FORMAT(User.Length, User.FormatString))
User.FeetInchIF(User.LUnitsInd=1,IF(User.Length>=1 ft,FORMAT(User.Feet,”#\’\-“),””)&FORMAT(User.Inch,IF(User.Inch<1 in,”0/#”&User.InchPrec&”\”””,”0 #/#”&User.InchPrec&”\”””)),0)

The first does some magic with the feet and inches and the second part just takes the Length and applies a normal Format to it. It is interesting that it uses IF(User.LUnitsInd=1 in LengthText and again in FeetInch. A better rain friendly format for FeetInch is

in that mixture of quotes and double quotes is a single quote for feet and double quote for inches. Now I need to give my brain a rest.

I hope you guys can helps.

John… Visio MVP in x-aisle
JohnVisioMVP.ca

Published by johnvisiomvp

The original Visio MVP. I have worked with the Visio team since 1993

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s