Specify shape using external data

Started by dlv1, July 08, 2015, 01:04:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dlv1

Hi all,

I'm trying to figure out how to use external data to determine which shape is displayed in a diagram. Here's the scenario:

I have a spreadsheet containing data that is associated with a component. I want one of the fields in this spreadsheet to contain a value that specifies which image or existing shape appears in Visio (perhaps in a container). For example, a ShapeName column in the spreadsheet might contain a value of "Component1", and when I link the row in the spreadsheet to a shape in the Visio diagram, the shape image that is displayed (as opposed to textual shape data) is the shape named Component1.

I've read about various techniques such as creating a grid with multiple images and using a formula to specify which part of the image is displayed, but I'm not sure if there is an easier way.

Any suggestions are greatly appreciated! Thanks in advance.

Surrogate

imho, 'external data' isn't usefull. You can use it only for associate shape data.
I see only one way: use macro!   

Yacine

#2
Hi dlv,
you are right with your idea.
You can put the images to display in one picture and use ImgWidth and ImgOffsetX to scroll through the picture.
ImgWidth being original size of the picture and ImgOffset (- the number of the smaller image) * ImgWidth/(Number of images).
To get the right image to display, you must link the formula to shape data. eg use a shape data field as input for the number of the smaller image.
The shape data can now be linked to external data.
I enclose an example on how this can be done.

Surrogate's suggestion is of course also a way to go and offers more flexibility.
Yacine