One of the things I noticed when reviewing Visio’s User Voice was the request for being able to have the shapes (they are actually masters) in the stencils be sorted. This is some code I have for keeping the masters in the document stencil sorted. Here is the before and after.
Category Archives: VBA
Adding Shape Data to a series of new shapes
I have been playing with Visio Visualization in Power BI and the first step is to create a Visio drawing. Basically it is a bunch of shapes, but I need to add Shape Data to the new shapes, basically the key that will link the shape to the row of data in Excel. I couldContinue reading “Adding Shape Data to a series of new shapes”
Removing unwanted properties from a collection of masters
In addition to cleaning up how the masters looked, I also had masters that contained user and custom (AKA Shape Data) properties that were no longer needed. Again VBA was useful. So I used the following code to Public Sub CleanMasters() Dim vsoMaster As Visio.Master Dim vsoMasterCopy As Visio.Master Dim vsoShape As Visio.Shape For EachContinue reading “Removing unwanted properties from a collection of masters”
Clean up Visio Masters
Anyone who has created Visio masters may have noticed that the masters may require cleanup. When selecting a master to edit, you may notice that the edit window seems to be empty and you will need to center the image to bring it back in view. Other times, the shape is bigger than the pageContinue reading “Clean up Visio Masters”
Colour My World Part II
Visio does not handle rows well and lists easily in the shapesheet, you can not do basic things like sorting the rows. So I use my favourite list handling app, Excel. When I need to manage large amounts of shape data, I manage it in Excel and then use VBA to remove the old shapeContinue reading “Colour My World Part II”
Friendly Visio Stencil
I am working with a stencil that contains almost 400 shapes and it is far from friendly. Normally a new stencil will show the icon for the shape and its’ name. With this project, the name is far from helpful. Undecypherable is more appropriate. If you right click the band at the top of theContinue reading “Friendly Visio Stencil”
Open Shape Surgery for the Visio Developer
One of the first gotchas for new Visio developers is the UnGroup command. Visio shapes are simple, they can have one colour and one line type. To make a traffic light, you need to group a red circle, yellow circle and a green circle. When grouped, Visio will take a collection of shapes and createContinue reading “Open Shape Surgery for the Visio Developer”