• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

bVisual

  • Home
  • Services
    • How Visio smartness can help your business
    • Visio visual in Power BI
    • Visio Consulting Services
    • Visio Bureau Services
    • Visio Training and Support Services
  • Products
    • Visio Shape Report Converter
    • SS Plus
    • LayerManager
    • visViewer
    • Metro Icons
    • Rules Tools for Visio
    • The Visio 2010 Sessions App
    • Multi-Language Text for Visio
    • Document Imager for Visio
    • multiSelect for Visio
    • pdSelect for Visio
  • Case Studies
    • Case studies overview
    • Using Visio in Education for GIS
    • Visualizing Construction Project Schedules
    • Visio Online Business Process Mapping
    • Nexans Visio Template
    • CNEE Projects, WorldCom
    • Chase Manhattan Bank
  • News
    • Recent news
    • News archive
  • Resources
    • Articles➡
      • ShapeSheet Functions A-Z
      • Comparing Visio for the Web and Desktop
      • Customising Visio Shapes for the Web App
      • Key differences between the Visio desktop and web apps
      • Using the Visio Data Visualizer in Excel
      • Using Visio in Teams
      • Creating Visio Tabs and Apps for Teams with SharePoint Framework (SPFx)
      • Designing Power Automate Flows with Microsoft Visio
      • Innovative uses of Visio Lists
    • Webcasts ➡
      • Visio in Organizations
      • My session and other Visio sessions at MSIgnite 2019
      • Power up your Visio diagrams
      • Vision up your Visio diagrams
      • The Visio 2010 MVP Sessions
    • Visio Web Learning Resources
    • Books➡
      • Visualize Complex Processes with Microsoft Visio
      • Mastering Data Visualization with Microsoft Visio
      • Microsoft Visio Business Process Diagramming and Validation
      • Visualizing Information with Microsoft Visio
  • Blog
    • Browse blog articles
    • Visio Power BI articles
    • Visio for Web articles
    • A history of messaging and encryption
  • About us
    • About bVisual
    • Testimonials
    • Bio of David Parker
    • Contact Us
    • Website Privacy Policy
    • Website terms and conditions
    • Ariba Network
You are here: Home / Visio / Visio 2013 / A Visio Deck of Cards

Published on December 3, 2014 by David Parker

A Visio Deck of Cards

Sometimes I try ideas out in Visio without a specific goal in mind, and I have been creating a Visio deck of cards recently, so I thought I would share it. In fact, I have only created one card but it is capable of being any card in the deck by changing its shape data! I can even get a randomly generated card … all without any code except for formulas in the ShapeSheet.

Firstly, I used four icons for hearts, clubs, diamonds and spades, from my set of metro icons stencils ( see http://blog.bvisual.net/2012/11/20/announcing-metro-icons-and-a-windows-app-tile-shape-for-visio/ ). I decided to keep the icons for the suits separate, with four per suit, but linked their visibility to a Suit Shape Data fixed list row. I also displayed the Value Shape Data as the text of each icon.

image

I added a Face Up Shape Data row so that the suit and value are hidden by the Microsoft Office logo.

I also created a Card Rack shape that automatically drops four playing cards into it when you drag and drop it on the page.

image

The Legend shape is the Microsoft one, and it will display the number of cards dropped onto the page that it is placed on.

Each card has Shape Data

image

Alternatively, the right-mouse menu of the card shape provides the ability to change most of the Shape Data, and features some nice suit icons to boot!

image

You can select a bank of cards together and change their shape data, such as Face Up, all in one go.

image

These playing cards were automatically laid out from the linked data recordset in the accompanying Visio document.

image

The alternative colors for the sight impaired can be displayed with the simple change of a page shape data value.

image

Now that I had a playing card shape that I am happy with, then I could start playing with how to use it!

So, I used the RAND() ShapeSheet function to generate a random number between 0 and 51, and then I converted this into one of the suit and values.

The formula for this action used on drop, if the DealOnDrop value is TRUE, and by the playing card right-mouse menu DEAL actions, is:

=SETF(GetRef(User.RandomValue),INT(RAND()*52))

Then, when the value of User.RandowValue changes, the following formula converts the number into a suit and value index, and pushes these values into the relevant Shape Data rows:

=DEPENDSON(User.RandomValue)+SETF(GetRef(Prop.Suit),”=INDEX(“&INT(User.RandomValue/13)+1&”,Prop.Suit.Format)”)+SETF(GetRef(Prop.Value),”=INDEX(“&MODULUS(User.RandomValue,13)&”,Prop.Value.Format)”)

These User-defined cell formulas provide the ability to drop a playing card with a randomly generated value onto the page, or I can use the Card Rack shape to automatically drop four cards, then insert more afterwards.

image

All I need now is to create a game with these cards … apart from Snap when the RAND() function provides the same card again!

The Visio 2013 document is available from PlayingCards.vsdx

Happy holidays….

Related

Filed Under: Games, Lists, Shape Reports, ShapeSheet Formulas, Visio 2013 Tagged With: Link Data to Shapes, Shape Data, ShapeSheet Functions

About David Parker

David Parker has 25 years' experience of providing data visualization solutions to companies around the globe. He is a Microsoft MVP and Visio expert.

Reader Interactions

Comments

  1. Jonas N Thompson says

    September 13, 2021 at 11:03 pm

    Hi David

    I am a retired Senior Systems Analyst. My goal is to demonstrate artificial intelligence by use of symbolic context (cards). I have a simple idea for imparting meaning to cards that can take full advantage of your card system. I want to propose a complementary idea to you.

    Reply
    • David Parker says

      September 14, 2021 at 6:55 am

      Jonas,
      I’m listening… DM me

      Reply

Trackbacks

  1. A Visio Countdown to Xmas | bVisual - a blog for people interested in Microsoft Visio says:
    December 24, 2014 at 2:07 pm

    […] presented a Visio deck of cards in a previous post ( see http://blog.bvisual.net/2014/12/03/a-visio-deck-of-cards/ ), and now I present a real game that can be played with Visio over the holiday season. Countdown […]

    Reply
  2. Get Scrabbled with Visio | bVisual - a blog for people interested in Microsoft Visio says:
    December 31, 2014 at 8:10 am

    […] http://blog.bvisual.net/2014/12/03/a-visio-deck-of-cards/ […]

    Reply
  3. Visio Pro for Office365 Partner Templates | bVisual - for people interested in Microsoft Visio says:
    November 17, 2016 at 12:42 pm

    […] A multi-faceted playing card – A Visio Deck of Cards […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

  • LinkedIn
  • Twitter

Recent Posts

  • Fixing dimensions of 2D shapes
  • Merging Linked Data from Similar Tables
  • Smart Radio Buttons and Check Boxes in Visio
  • Using Button Face Ids in Visio
  • Grid Snapping Revisited

Categories

Tags

Accessibility Add-Ins Connectors Containers Data Export Data Graphics Data Import Data Visualizer Educational Excel GraphDatabase Hyperlinks Icon Sets JavaScript LayerManager Layers Legend Link Data to Shapes Lists MSIgnite MVP Office365 Org Chart PowerApps PowerBI PowerQuery Processes Setup and Deployment Shape Data Shape Design ShapeSheet ShapeSheet Functions SharePoint 2013 SQL Teams Validation VBA Video Visio Visio 2007 Visio for the Web Visio Online Visio Services Visio Viewer Webinar

Footer

bVisual Profile

The UK-based independent Visio consultancy with a worldwide reach. We have over 25 years experience of providing data visualization solutions to companies around the globe.

Learn more about bVisual

  • Amazon
  • E-mail
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Search this website

Recent posts

  • Fixing dimensions of 2D shapes
  • Merging Linked Data from Similar Tables
  • Smart Radio Buttons and Check Boxes in Visio
  • Using Button Face Ids in Visio
  • Grid Snapping Revisited

Copyright © 2025 · Executive Pro on Genesis Framework · WordPress · Log in