Updating title blocks

Started by Totores, June 29, 2023, 11:24:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Totores

Good morning,
need help, I have created a drawing template and my custom title block, I have duplicated the tabs so that I now have 3 of the same drawing.
Is it possible to fill the title block on the front page and have the fields in the other 2 tab pages update?

P.S. my organization IT will not allow macros to run.

Thanks

wapperdude

#1
Yes you can do this within the shapesheet without macros.

Here is the general description about building cell references:  https://learn.microsoft.com/en-us/office/client-developer/visio/about-cell-references.

What you're after is the Page/Shape/Cell construction.  The necessary syntax is provided.

See the attached file.  The shape on page2 references the User Section, with a named row, on Page1.  Both shapes use  field insert to display the entry in the shape1.  All done within shapesheet.
Visio 2019 Pro

Totores

Thanks, I will need to work through it.
All I need is to enter the project number in the cell on the front page title block and the same project number will appear on the same cell in the following pages/tabs

wapperdude

Yep.  That is what the attached file demonstrates.  Not knowing your actual implementation, the file uses a row in the User Section of each shape on each page.  The 2nd page shape has a formula that fetches the entry from the 1st page shape.  The syntax is there.  You need to modify formula for your specific case.

The reference link has a table for various possible cases.  It can be of use for future scenarios.
Visio 2019 Pro

Yacine

Yes, it is feasible as Wapperdude showed, but think also about using a background page, which would be Visio's standard approach.
Yacine

Totores

Thanks all for your comments, I did find a tutorial that covers exactly what I was trying to achieve (https://www.youtube.com/watch?v=toweOQWHSCI)
I have managed to duplicate this on a simple blank 3 pages blank project, however, when I apply this to a project created by someone else containing 6 pages when I enter this formula

=SHAPETEXT(Pages[Plan1]!Sheet.1235!TheText)

I get "error in formula" error and I can't figure out what's the error is.

The project is a drawing not a template
Not sure if the pages where originally duplicated or inserted
The example above is from a box created in an "inserted page" linking it to a box in the front page
The front page is called Plan1
The reference box is Sheet.1235

wapperdude

#6
The most likely culprit is the page name.  Visio has both a local and universal name for pages.  If a page has been renamed more than once, these get out of sync.  See this link for simple code to relaunch the universal and local names.  It will go thru entire file and update the universal name to match the local name.  The local name is the one displayed on the page tabs.  After it runs, your formula should work as is.

http://visguy.com/vgforum/index.php?topic=9693.msg43645#msg43645.  Note, you can run the macro once and delete it.  As long as the page names are not altered, you will not need it.  Save the document. 

Visio 2019 Pro

Surrogate

#7
Quote from: wapperdude on July 11, 2023, 03:04:30 AM
The most likely culprit is the page name.  Visio has both a local and universal name for pages.  If a page has been renamed more than once, these get out of sync.
Few years ago i created this solution.
Quote from: Surrogate on May 21, 2020, 01:13:25 PMHope my Snippet for ShapeSheet can helps you
Please try this way...

Quote from: Totores on June 29, 2023, 11:24:28 PM
P.S. my organization IT will not allow macros to run.
Ooops...

wapperdude

#8
@Surrogate:  the macro restriction is a valid point, but it was NOT an oversight.   AFAIK, there is no other mechanism within Visio to re-sync the page names.
1) The code is simple enough, that it could easily be written manually.  Thus, there is no imported macro ban violation.
2) Presumably, the macro ban doesn't apply to in-house automation.
3) Once run, the code can be removed/deleted.  It would not remain a residual part of the file.

There are two alternatives:
1) manuall change each and every page, any and every time a change is made to the source page
2) per Yacine's suggestion, put the title block on a background page, and then edit each page's properties to include the background page.  Thus, only the BkGnd page needs editing.

Not aware of any other alternatives.
Visio 2019 Pro

Totores

My apologies for not getting back to you guys been really busy recently :(, first of all I would like to thank everyone for their comment. I did find a solution.

As my design is very simple, I:
- Create a new document
- Create new tabs for my need in the new document
- Copied all the elements from the old document tab 1 to the new document tab 1
- Copied all the elements from the old document tab 2 to the new document tab 2

Closed the old document and then followed the instruction from (https://www.youtube.com/watch?v=toweOQWHSCI) in the new document. It all worked as I wonted it to.

Thanks again to everyone.