• 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 / Now() then, settle down!

Published on January 30, 2012 by David Parker

Now() then, settle down!

It has long been said that Visio’s ShapeSheet was modelled on Excel’s WorkSheet with it’s ability to enter formulae from a set list of functions. Indeed, there is a lot of similarity between some of Visio’s ShapeSheet functions and similar ones found in Excel, however one should exercise some caution and check that the behaviour is as expected. I recently forgot to do this with the NOW() function, and it caused me some grief for a while.

I had constructed a Today shape in Visio, and used the NOW() function to position the shape in the horizontal, and to display the date value in a Shape Data row and in the ScreenTip.

In Excel, if you enter the NOW() function into a cell, it immediately evaluates when the formula is entered. So, if you enter the same formula in multiple cells (by typing … not copying), it will evaluate at the time that you enter it. Thus you can apparently have different times displayed.

image

However, if you save or close then open the workbook, then all of the NOW() formulae are re-calculated at the same time:

image

In Visio,the behaviour is different. In the following example, I entered the formula =NOW() into the text of three rectangles, and, as you can see, the time is always the same:

image

Moreover, the time updates every minute! In the following screenshot, the Event Monitor, rom the Visio SDK, shows how the NOW() function is fired every minute, in every cell that uses it (even if it is in a Master!) :

image

So, be careful how you use the NOW() function in Visio because overuse will slow down your diagram.

Related

Filed Under: Visio, Visio 2010 Tagged With: 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. Chris Roth says

    February 14, 2012 at 8:24 am

    There is a registry setting that controls how often NOW fires. If you’ve set Visio to show all settings in the registry (somewhere in the Visio options settings), you find this setting:

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Visio\Application
    animation = 60000

    Set animation to 1000, for example, and your NOW will update every second. If you have a lot of these on the page, your drawing will flicker like nuts. But you can get things to move around on the page too, which can be neat and useful. Hence the setting is called “animation”.

    I have a shape on my test page with NOW() displayed as insert-field text. It is updating live, like a real digital clock. I’ll have to remember to reset animation to 60000.

    If you need values from NOW, but don’t want them to update, you can use the SETF ShapeSheet function. For example, you can blast a timestamp into a user cell to note when a shape was dropped:

    EventDrop = SETF(GetRef(User.Date),NOW())

    When the shape is dropped, the evaluation of NOW() will be written to the User.Date cell that I created. Interestingly, the NOW() in this cell doesn’t cause EventDrop to constantly “go off” and re-blast the value to User.Date. But you could add a bit more to the formula:

    EventDrop = SETF(GetRef(User.Date),NOW())+SETF(“EventDrop”,”0″)

    The second SETF in this expression overwrites the EventDrop formula, effectively erasing it.

    Note that it uses quotes around the cell name and doesn’t make use of GetRef. This is an older syntax, which has the advantage of shielding the formula from being fully evaluated on entry. Visio won’t let us enter …+ SETF(GetRef(EventDrop),0) because that is a circular reference. With quotes, Visio waits until the EventDrop actually happens, THEN tries to make sense of the formula.

    This quoted-cellname syntax is a bit un-kosher, and I wouldn’t recommend using it all over the place, especially for custom-named user- and shape data cells that may or may not exist. But every Visio shape has the EventDrop cell, so it is safe in this example, and is a good way to write one-time, on-drop formulas.

    Reply
    • davidjpp says

      February 15, 2012 at 10:48 am

      Thanks Chris, that’s useful for users who have the ability to mess with their Registry

      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