Author Topic: How do I display new data field across multiple shapes ?  (Read 3461 times)

0 Members and 1 Guest are viewing this topic.

Mister_D

  • Newbie
  • *
  • Posts: 3
How do I display new data field across multiple shapes ?
« on: February 03, 2014, 05:05:12 AM »
Hi guys,

I have visio diagram with approx. 30 'server' shapes in it, all created from a master stencil with data fields of Server Name and IP Address.  The shapes currently display these two fields.

Say that I want to add and *display* a new and third data field across all existing shapes in my diagram called 'Operating System', how would I go about doing this?  I need to avoid updating my master stencil server shape with this new field and then having to create 30 new shapes to replace the existing ones (all the existing ones are linked to an excel data source).

Many thanks for any assistance, and apologies if this is covered elsewhere, I wasn't able to find the thread.

Adam

Yacine

  • Hero Member
  • *****
  • Posts: 2714
Re: How do I display new data field across multiple shapes ?
« Reply #1 on: February 03, 2014, 01:59:16 PM »
Open the document stencil, find the master of the shape and open it, add the additional field, insert it in the text, save and close. All the childs of this master should update.
I tried it. It works.
HTH,
Yacine
Yacine

Mister_D

  • Newbie
  • *
  • Posts: 3
Re: How do I display new data field across multiple shapes ?
« Reply #2 on: February 03, 2014, 10:42:17 PM »
Thank you Yacine for the light-bulb moment.  I was trying to add the new data field to the master shape in my saved stencil, not master shape in my Document Stencil.

I still experience something not quite right..

Now when I add a new data field in my Document Stencil master shape, and I close the update window and then Accept the update to itself and all shape instances in my diagram, all the instances are updated with the new actual Label Name ie. Operating System, not the actual value from the linked Excel data source.  When viewing the shape instances' Shape Data, the correct value is pulled from the Data Source, but only the Label is being displayed.  Now, when I select the updated Document Stencil Master, the go to a Row in my Excel data source, and drag into my diagram, everything looks fine, and the value of the Operating System label is shown, not the actual label name of "Operating System".

Probably something you can't reproduce, but I can send you my file and you can see my issue if you ever have some time to kill.

Thanks again..Adam

aledlund

  • Hero Member
  • *****
  • Posts: 1412
Re: How do I display new data field across multiple shapes ?
« Reply #3 on: February 04, 2014, 09:16:57 AM »
the caution is the shapedata field name must match the column name in excel exactly.
al

Mister_D

  • Newbie
  • *
  • Posts: 3
Re: How do I display new data field across multiple shapes ?
« Reply #4 on: February 05, 2014, 04:44:07 AM »
Hi again,

yes the labels match up, as it proved by the fact that 1. when I drag a new row, this new third data field is displayed correctly with the expected value from the Excel column, 2. in Shape Data, the value is shown, but the Label is persistent on existing shapes.

Once again, when I update my Document Stencil Master Shape with a new data field (that is linked to a Excel data source 'column') and I also say make a formatting change such as create a colored outline on the Master Shape..when I Accept all changes to inherited shapes, the outline is correctly replicated to all shapes, but the new data field only shows the label ,eg. "Operating System", not the actual value eg. "W2K8 R2".  I can see the value is being pulled from data source proven by the Shape Data which shows Operating System is equal to value W2K8 R2, but this value is not replicated to the inherited/existing shapes, only the Label "Operating System" is.  Can someone try repeat this and see result?  When I drag an existing row that is already a linked shape, the newly dragged shape is 100% fine, but the existing shape that is linked to the SAME row, is still showing the label, not the value.

thanks Adam
« Last Edit: February 05, 2014, 04:50:24 AM by Mister_D »

grc_rh

  • Newbie
  • *
  • Posts: 1
Re: How do I display new data field across multiple shapes ?
« Reply #5 on: February 10, 2014, 09:37:14 AM »
Hi,

Is there a way to add a new data field (i.e. showing page name) to all existing shapes without using master shapes?
(I'm dealing with a large messy document which has been worked on by many different users, and so uses a large number of master shapes.)

I.e. Would it be possible to use VBA to repeat the process below on all shapes?
For a single shape: Select shape; Open shape ShapeSheet; Add new row to Shape Data, Change Shape Data Row Label to "Page"; Change Shape Data Row Value to "=pagename()".

Thanks very much for your help! (I understand this won't affect any new shapes created later, but I can use appropriate master shapes for those)
Ruth