My good friend Scott Helmers, Visio author and trainer, of Harvard Computing Group , recently asked for some help in keeping data graphic items level when their target shape is rotated. Fortunately, I was able to assist, so I thought I would explain how this can be done, and also update my Icon Maker macro from a few years ago. The updated macro is available to download for free and includes the extra ability of sizing the icons. I chose to use some bee stickers from the Insert / Illustrations / Icons tool in Visio Plan 2, and the Status options from the Process shape in the Basic Flowchart Shapes stencil to demonstrate.
All I had to so was to associate a suitable bee with a Status value 🙂
The trick is to ensure that the graphic item is a group shape without any visible text or geometry, but must contain at least one line which is preferably horizontal. Then to have a User-Defined Cell, named, say, Angle with the following formula:
"=ANGLETOPAR(ANGLEALONGPATH(Geometry1.Path,1),Width,ThePage!PageWidth)"
This formula uses the ANGLEALONGPATH(…) function to get the angle of a specified geometry segment, then the ANGLETOPAR(…) function to get the angle relative to the page. See Visio ShapeSheet Functions A-C for more of an explanation of these functions.
Then the Angle cell in sub-shapes just need to reference the User.Angle cell of the top shape, but prefixed with a minus sign. The effect is that the icons will remain level to the page when the target shapes are rotated:
Simply run the bVisualIconSetMaker.IconSetMaker.MakeIconSetFromShapes macro in the bVisualIconSetMaker.vssm macro-enabled stencil to create a data graphic icon set from the selected shapes.
New Requirement for VBA Digital Signatures in Visio
Like most developers, I have to buy a new digital certificate every 3 years to sign my Visio add-ins and VBA projects. Usually that means verifying my bone fides, paying the fee and downloading the certificate, but security has been increased, and now, like everyone else, I have to use a USB key with it…
Understanding Segments of Visio Geometry
I recently had to revise my understanding of the POINTALONGPATH(…) function in Visio because I was getting a #REF! error in some cases. My particular scenario requires a line with a number of vertices that are initially all in a straight line but can be moved by dragging controls around that each vertex is bound…
Custom Color Themes in Visio?
I was recently looking into custom color themes for corporate branding in desktop Microsoft Visio and became re-aware how different Visio still is from the rest of the Microsoft Office applications. A Visio page or document does not need to have any theme applied, but the documents of the other Office applications always have a…
When is a Visio Callout not a Callout?
I have been a Visio user/developer since the mid-1990’s and seen the word “callout” used as part of the name of many master shapes in Visio. The images below show five ways that the term “callout” has been applied to the name of Visio master shapes. Generally, each evolution has been an advance on the…
Using Visio Color by Value on Connectors
Data Graphics in Visio Plan 2 and Visio Professional is great, but it only enables us to use them with 2D shapes in Visio, i.e. not on connectors. So, what if you want to change the line colour of the connectors between the 2D shapes because of the data flowing between them? Well, it is…
Moving Phases/Separators in Visio Cross-Functional Flowcharts?
I use Visio Cross-Functional Flowcharts a lot, but there is one thing that really bugs me … you can move function bands\swimlanes around, but you can’t move the phases\separators in the same way. The phases/separators are containers just like the function bands\swimlanes, so why can’t I move them? Actually, it is quite understandable when you…
Leave a Reply