Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: dmbalzer on April 26, 2021, 03:55:01 PM

Title: Text field referencing Document User-defined cell not updating
Post by: dmbalzer on April 26, 2021, 03:55:01 PM
So I have a titleblock (master) that goes on every page of my document with text fields referencing specific document user defined cells (changed thru vba in a form).  On some occassion's the text fields are not updating unless they are changed specifically. Has anyone else come across this?
Title: Re: Text field referencing Document User-defined cell not updating
Post by: Paul Herber on April 26, 2021, 03:58:39 PM
Visio version?
Title: Re: Text field referencing Document User-defined cell not updating
Post by: Surrogate on April 26, 2021, 04:48:14 PM
Sometimes cells updated after change scale to 400%
(https://forumimage.ru/uploads/20140818/140835070128749569.gif)
Title: Re: Text field referencing Document User-defined cell not updating
Post by: dmbalzer on April 26, 2021, 04:54:06 PM
Using Visio 2016 64bit.
Title: Re: Text field referencing Document User-defined cell not updating
Post by: wapperdude on April 26, 2021, 07:12:00 PM
Using V2019 64B.

Not sure how you're accessing the data entry, so, this may not be conclusive.  Basically, seems to work fine.

What I did, via Drawing Explorer, added some standard entries...author, manager, etc.  Also, edited Doc shapesheet and added both User and ShapeData sections.  Created an entry for both.

Then, added Title Block to background page.  Selected various subshapes in the Title Block, and then used Insert Field.  Some shapes received entries from  the Doc, some from either TheDoc!User.whatever or TheDoc!Prop.whomever.

All of these displayed correctly.  Went to drawing page and added the background page.  All info was correct.

Again, back to Drawing Explorer, and edited the various entries.  All changes showed up immediately.  No zooming required.  View was complete drawing page. 

It may be that your data entry method is not triggering an event which would cause the changes to update.
Title: Re: Text field referencing Document User-defined cell not updating
Post by: dmbalzer on April 26, 2021, 07:50:56 PM
The data is changed with vba getting the ActiveDocument.DocumentSheet.CellsU("name").resultStrU, populating the form and setting its formulaU after submitting the form. 

Seems to only happen after reloading the document after a while, and when it happens it only changes the changed values in the form (there are several).  Others are unaffected, blank cells have an empty string "".

I am guessing an event is getting missed too, might turn on the event monitor and see what I get.
Title: Re: Text field referencing Document User-defined cell not updating
Post by: Surrogate on April 27, 2021, 07:47:05 AM
Quote from: Surrogate on April 26, 2021, 04:48:14 PM
Sometimes cells updated after change scale to 400%
In my case i changed cell's value in DocumentSheet via SETF.

Also in Russian Visio forum (https://translate.google.com/translate?sl=ru&tl=en&u=https://visio.getbb.ru/) we have a discussion thread where we investigate the problem: Updating ShapeSheet cells (https://translate.google.com/translate?sl=ru&tl=en&u=https://visio.getbb.ru/viewtopic.php?f%3D40%26t%3D1464)