Still in lockdown on holiday, so I thought I would create a version of backgammon that can be played with Visio for the web. This was inspired by my original Visio tutor, the late David Edson, who created a Visio backgammon document which included macros. Macros are not available in Visio for the web, so I have created one where the dice can be shaken, the doubling cube changed, and the pieces reset, using nothing but ShapeSheet formulas.
Checkout the previous two articles in this series Play Checkers with Visio in Teams and Play Chess with Visio in Teams for more information about how the resetting of positions works works. Backgammon requires a Doubling Cube and Dice shape, in addition to a different board to the previous two.

Each of the Die sub-shapes within the Dice shape, have a User.ShakeDiceTrigger formula:
=IF(ThePage!User.ShakeDice,
SETF(GetRef(Prop.Face),"=INDEX("&INT(RAND()*6)&",Prop.Face.Format)"),
0)
This sets a random number between 1 and 6 on the die face. It was not strictly necessary to have a Prop.Face Shape Data row of Fixed List type, but I was originally going to provide a list to choose from. If the Prop.Face Shape Data row was a number, then the formula could have been:
=IF(ThePage!User.ShakeDice,
SETF(GetRef(Prop.Face),"=INT(RAND()*6) + 1"),
0)
Download Online Backgammon.vsdx and add it to your SharePoint Online or Teams library.
Taking Visio Actions Rows to the limit
I recently (re-)discovered that there is a limit to the number of Actions section rows that will be evaluated for display on the right mouse menu of a Visio shape. I have not hit a limit (yet) for the number of rows that can be added to the Actions section … so why is there…
Custom Shapes in Visio in M365 and Web
Microsoft recently announced the ability to access the shapes in the document stencil whilst using Visio for Web … if you have a Visio Plan 2 license. So, I thought I would make it clear what that means for custom shape developers. There are now three licenses that provide the ability to edit Visio diagrams…
Visio Presentations for the Microsoft Ignite The Tour 2020
Just when we thought the pandemic was coming to an end, another variant appears to scupper our plans. So, resuming in-person events is delayed, and the world isn’t safe until the world is immunised. Therefore, I decided to make the presentations that I was going to be presenting on the abandoned Microsoft Ignite The Tour…
Visio in Microsoft 365? What’s that?
Now that a version of Visio is being rolled out as part of the commercial subscription of Microsoft 365, what is the difference between it and the Visio Web App that is delivered by Visio Plan 1 and Visio Plan 2 subscriptions? Moreover, can a Visio diagram created by an M365 user be round-tripped with…
Visio ShapeSheet Functions T – Z
The seventh, and final, 25 of the Visio ShapeSheet functions that start with the letters T – Z are visually described in the Visio document below that is available for download. Please see the general introduction to this series at ShapeSheet Functions A-Z for more information. (more…)
Visio ShapeSheet Functions S
The sixth 19 of the Visio ShapeSheet functions that start with the letter S are visually described in the Visio document below that is available for download. Please see the general introduction to this series at ShapeSheet Functions A-Z for more information. (more…)
Leave a Reply