Sharing Shape Data Between Pages

Started by Scott10284, March 09, 2016, 08:11:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Scott10284

I am new to the forum but I have been using Visio for a while.

I am using Visio 2013

I am trying to share shape data between pages. I set up the cover page of my drawing set such that the values of the drawing title, customer name, date, revision, etc are stored in those shapes as shape data. What I would like to do is share those pieces of data with the title block that is on a background page. I want to do this so that when I edit my cover page, the title block that appears on every other page also updates with the same shape data.

After doing some research, I have attempted to share the data by inserting the following code in the titleblock shape's shapesheets:

Pages[COVER]!Sheet.42!Prop.JobTitle.Value

The Shape Name of the data I am trying to copy to my title block in this case was Sheet.42.

But the syntax is obviously wrong, I am getting the error in formula message. I got this idea from this forum, but the user was running 2007. I have 2013.

Nikolay

The formula seems to be correct.

Just make sure you use correct page and shape names.
You can post the link to the file here, maybe somebody will be able to come up with a quick fix.


Scott10284

Quote from: Nikolay on March 09, 2016, 11:30:02 PM
The formula seems to be correct.

Just make sure you use correct page and shape names.
You can post the link to the file here, maybe somebody will be able to come up with a quick fix.

I made sure that my page references and shape references are correct, I'm not sure why this is not working.

I have uploaded a file, if any code experts out there could help me I would appreciate it.

To be clear, I am giving the shape on my coversheet data, and displaying it by inserting a field (shape data). I am trying to do the same thing on the title block background page.

Scott10284

I realized that it will work with 2 foreground pages. When I link the data the is entered on my cover to a background page it does not work.


Gustavo

Have you tried with a PageName!SETATREF() instruction in the targeted cells? It worked for me. Regards

bmwk100dk

Hi
I don't know if you have found a solution, but I may have one for you in the attached file. I just added Data to my first page (Page-1) and the then inserted a Textfield in the shape on the Background page (Background-1) using the following.

SETATREF(Pages[Page-1]!ThePage!Prop.Title_Text.Value)

Hope it will be of use.

PS. I'm using Visio 2010

jw76novice

Scott,
Are there some data fields that are the SAME across ALL PAGES (Customer Name) and others that are different for EACH DRAWING?

I have developed a setup exactly like this and will try to explain it here.  Hope this helps!

  • The Visio document is for a single project.
  • The project uses one background page and one foreground page for each drawing type (Mechanical, Electrical, Process Flow, etc.).
  • Elements of the title block are split between the background and foreground pages.  All project-level fields are put on the background page(s), and all drawing-level fields are put on each foreground page.  (I use the Duplicate Page function as needed to create multiple foreground pages.)
  • All project-level fields are stored in the Document ShapeSheet, Shape Data section:
      - Location
      - Project Number
      - Project Name
  • These are duplicated on the background Page ShapeSheet, Shape Data section, but they use the SETATREF function to simply push/pull the Document-level data:
      - SETATREF(TheDoc!Prop.REG_Location)
      - SETATREF(TheDoc!Prop.REG_ProjNum)
      - etc.
  • All drawing-specific fields are stored in the Page ShapeSheet, Shape Data section, of each foreground page:
      - DrawingID
      - DrawingTitle
      - DrawingRevision
      - etc.
  • On each individual textbox in the title block - DrawingID, Project Number, etc. - use the Insert Field function to enter a custom formula to pull in the appropriate TheDoc or ThePage value.  Textboxes on the background pages reference only TheDoc values, and foreground pages reference only ThePage values.
  • The textboxes that show these fields also duplicate their Shape Data fields but use the SETATREF function to set the Page-level data:
      - SETATREF(ThePage!Prop.DrawingID)
      - SETATREF(ThePage!Prop.DrawingTitle)
      - etc.
  • I wanted to give the users the flexibility to set title block info by clicking either the page and going to the Shape Data window, or by clicking the individual textbox in the title block and using its Shape Data window.  I did not go so far as to create "empty" textboxes on the foreground pages for project-level data, as I didn't want foreground textboxes "stacked" on top of their background counterparts.  (Hope that makes sense.)  Besides, you only set the project-level data once at the start of a project.

Once this is set up, you simply navigate to the background page (any of them), click anywhere, then set your project-level fields in the Shape Data pane.  This is entering the data in that Page ShapeSheet, but the SETATREF function is pushing the values into the Document ShapeSheet, so all the other background pages are immediately "pulling in" the data as well.  The textboxes in your title block also populate immediately.  Then, as you create new drawings using the Duplicate feature of your blank foreground pages, you click anywhere on those pages to enter the drawing-specific Shape Data.  As mentioned above, I took this a step further and applied the same "Shape Data duplication with SETATREF functions" to the textboxes in the title block, but honestly it's much faster to just enter everything in the Page's Shape Data window.

Again, hope this helps but post back if you have any questions on this setup.
Visio 2013 Professional