Sheets sharing data and updating across pages

Started by rodney.kimble, August 20, 2024, 10:15:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thomas Winkel

Good to hear that it works for you.
I don't know what the user Prompt cell is intended for. But it can store up to 64kB of text and can be used for your formulas exactly as the Value cell. So, I use it do decrease the amount of rows.
Anyhow, the prop Prompt cell is used for pop-up message when hovering the mouse over the property in the shape data window. So I wouldn't use that for other things.

I recommend to distribute your code in a central stencil that you share with your colleagues.
The documents should be stored without code as .vsdx.
That's much easier to maintain.
Have a look here for a starting point with ribbon menu:
https://visguy.com/vgforum/index.php?topic=7134.0

rodney.kimble

Hope everyone had a Merry Christmas

I'm back again because I have reached my wits' end.

I've made a lot of progress and my template and sheet are being used, but it moves extremely slow and is holding up our workflow. It's still an overall benefit to the team, but it could definitely be faster. The reason why this code is moving so slow is because in order to resync every shape, I first have to erase the sync shape formula from every shape on the page, then rebuild the sync ids, then rebuild the sync shape formulas, and then re-add the formulas to every shape on every page.

I added a progress bar to the code to see what was taking up a majority of the time spent resyncing, and it is indeed the erasing and re-adding the formulas for every shape on every page. The problem being, if I skip those steps, then the shapes on the page that I'm working on and every page after lose all of their sync data and pretty much turn blank. Which pretty much destroys any project you're working on.

Just wondering if there's a way to skip those steps somehow, or to maybe speed up the process because when making sheets with hundreds of shapes throughout the document this takes an extremely long time.

I understand this may no longer be in the Smart shapes category, but I'm following up here since this is where my project started. Any help or ideas would be greatly appreciated.

Code I'm currently using is attached.

Thomas Winkel

Quote from: rodney.kimble on December 27, 2024, 04:42:07 PMThe reason why this code is moving so slow is because in order to resync every shape, I first have to erase the sync shape formula from every shape on the page, then rebuild the sync ids, then rebuild the sync shape formulas, and then re-add the formulas to every shape on every page.
We only update the DocumentSheet cells, but we don't touch the formulas in our solution.
Why do you need to erase and re-add the formulas?

rodney.kimble

Quote from: Thomas Winkel on December 27, 2024, 05:21:55 PM
Quote from: rodney.kimble on December 27, 2024, 04:42:07 PMThe reason why this code is moving so slow is because in order to resync every shape, I first have to erase the sync shape formula from every shape on the page, then rebuild the sync ids, then rebuild the sync shape formulas, and then re-add the formulas to every shape on every page.
We only update the DocumentSheet cells, but we don't touch the formulas in our solution.
Why do you need to erase and re-add the formulas?

The reason I have to do this is because if I don't, Visio behaves in the way shown in the screenshots below. The first image is before I sync it. And the second image is after syncing, with no erasing and re-adding formulas to every shape. It pretty much erases everything that's supposed to be synced on this page and every page afterwards. The only data left on the shapes is the data that I don't have any sync formulas for.

Thomas Winkel

If you provide a minimal example that I can use to recreate the problem, I'll take a look at it.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 212 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1078KB.
Tokens: post-login.
Cache hits: 13: 0.00177s for 26,613 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]