My last two blogs have been about how I managed to convert XAML icon shapes into native Visio masters. Well, I have now converted all of Syncfusion’s Metro Studio 2 (now 5) shapes, and got their permission to release my own version of them. See Products/MetroIcons for more information.[Read more…] about Announcing Metro Icons and a Windows App Tile Shape for Visio
Whilst the east coast of America has been battered by hurricane Sandy from the Atlantic (my commiserations), Microsoft have been hosting the //Build/ conference in the Pacific North West (specifically Redmond). I have been watching some of the overly fed attendees whoop with joy as they got given 100 Gb SkyDrive account, a Microsoft Surface and a Nokia Lumia 920 each. Yes, I felt jealous, but it would have cost me much more than their combined cost to get out there, so I stuck my head-phones into my large laptop and watched from the comfort of my living room. The reality of the devastation caused by nature can easily overwhelm the storm of technological advances that have been recently announced, but I am genuinely excited by Windows 8, SharePoint 2013, Office 2013 and, of course, Visio 2013.[Read more…] about US Election Special – Vector Visio 2013 Icons
I was recently asked how I would approach improving the Logic Gate 2 in the Circuits and Logic template, on the Analog and Digital Logic stencil. Well, this had resonance with me because I had often wondered why these shapes were not smarter than they are, so I looked more deeply into the shape construction to see how the Logic Gate 2 shape works, and how it could be improved so that the values of the inputs could be set and the logic applied to provide the correct output value. Eventually, similar improvements can be applied to all of the master shapes so that the connected logic diagram responds to input value changes.
The Existing Shape
The Logic Gate 2 shape has Shape Data rows to provide some configuration. Firstly, you can change the number of inputs from 2 to 5, and the number of outputs from 1 to 3:[Read more…] about A Visio Logic Gate with Logic
I am currently developing a Visio 2010 shape which has multiple geometry sections in it, and thought I should check it in Visio 2013. To my surprise, I found a difference in the rendering of the shape’s line caps, and I thought that I had found a bug in Visio 2013, but further investigation revealed that Visio 2013 has fixed a bug in Visio 2010 (and earlier)…
I create a square shape with an inscribed triangle and changed it’s weight to 6 pt in order to exaggerate the effects of different Line Caps in my test shape. Notice that the Line Cap can be one of three values : Round, Square or Extended, which is equivalent to 0,1 or 2 in the LineCap cell in the ShapeSheet.
Well, it looks like Microsoft Office 2013 has been released to manufacture ( see http://blogs.office.com/b/office-news/archive/2012/10/11/office-reaches-rtm.aspx ). I think that includes Visio 2013 too, even though Visio dropped the Office prefix for the Visio 2010 release.
All I need now is a Surface so that I can draw with my fingers! I must admit that I used to use a Pen and Tablet when I was a CAD user many years ago, but have stuck with a mouse for quite a while now, although I hate drawing or writing freehand with it.
I am pretty sure that my handwriting has got a lot worse because I use a keyboard so much (and probably my spelling too). I used to sketch with chalk or a pencil, but years of pushing a plastic rodent, and clicking its ears have probably reduced my dexterity.
So, I am really looking forward to Visio 2013 on a Windows 8 Surface …
I have been analysing a client’s Visio shapes recently to find out how to increase their performance. These shapes have numerous cells with ShapeSheet functions that reference other cells in the same shape, in parent shapes, in the page and in the document. I suspected that there may be some formulas producing erroneous results, so I wanted to write a macro to check if there are any cell formula evaluation errors in the shape, or its sub-shapes.
A Visio Cell object has an Error property that returns the error code generated by the last evaluation of the result. See http://msdn.microsoft.com/en-us/library/office/ff767327.aspx for more information about the the Error property, and http://msdn.microsoft.com/en-us/library/office/ff766442.aspx for the VisCellError constants.
In order to test a macro that can check a shape for errors, I fist needed to generate examples of each possible error in a shape. So, I created a User-defined Cells section with seven rows – one for each possible VisCellError code value.
I was able to generate errors in all rows, except for the VisErrorName row. No matter how hard I tried, I could not get Visio to generate this error. I am fairly certain that I could generate errors (accidently) before Visio 2010, but I think that Microsoft have made this error much rarer because of the way they substitute last known values when a referenced cell or row is deleted.
So, now that I had a shape with errors, I then duplicated it, and made the duplicate copy part of a grouped shape. This way I could test my function, CheckForErrors(), which simply iterates through all of the selected shapes, and their sub-shapes, and prints out any cells with errors into the Immediate Window:
My macro printed out the following table:
So, I can now check any shape to see if it has any cell errors within it.
The VBA code that produced the listing is :
Public Sub CheckForErrors() Dim shp As Visio.Shape Debug.Print Now() Debug.Print "Parent.Name", "Shape.Name", "Section", "Row", "Column", "Name", "Error", "Formula" For Each shp In Visio.ActiveWindow.Selection CheckShapeForErrors shp Next End Sub Private Sub CheckShapeForErrors(ByVal shp As Visio.Shape) Dim shpSub As Visio.Shape Dim iSect As Integer Dim iCol As Integer Dim iRow As Integer Dim cel As Visio.Cell For iSect = visSectionFirst + 1 To Visio.visSectionLast For iRow = 0 To shp.RowCount(iSect) - 1 For iCol = 0 To shp.RowsCellCount(iSect, iRow) - 1 Set cel = shp.CellsSRC(iSect, iRow, iCol) If cel.Error <> VisCellError.visErrorSuccess Then Debug.Print cel.Shape.Parent.Name, cel.Shape.Name, iSect, iRow, iCol, cel.Name, cel.Error, cel.Formula End If Next iCol Next iRow Next iSect For Each shpSub In shp.Shapes CheckShapeForErrors shpSub Next End Sub
I would be interested to find out of anyone who can create a VisErrorName for me!