Shape callout ? Or change shape according value.

Started by kiler40, March 28, 2013, 02:05:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kiler40

Hello again :)

I have a list of pictures (Thanks to Dmitry :) ) And now I try to change shape according other "shape data" value.

In the attached file there is a shape that have shape data called "number" the value is 2-2
In the document stencil there are 2 shapes called 2-2 and 2-3.
My question is: Is it possible to link data callout to shape name, and when I change value from 2-2 to 2-3, the picture/shape to change.

Another issue and it is important one. Can this shapes be taken from a stencil that is not loaded in the document stencil (The file will be enormous if i load the entire data...)

I believe I have met somewhere in the forum another topic about this, but I really cant find it (sorry about that  :-\ )

MacGyver

Yes,
How i would go about doing this is creating a master that contains all of these shapes and has a text field which displays the shape data (called "number")
Have formulas in each picture shape that hides the entire shape (by setting the ImgWidth cell = 0) unless the "number" of the master is of the number assocaited with the picture.

Easier to show then tell.
Each imagewidth cell should contain a formula like
=IF(Sheet.2!Prop.Row_1 = "2-2".Width*1,0)

See the attached document.

kiler40

And yet have to add all in the main shape firs....
and if i have thousands of images :) On every one have to add this function.

Other situation is like this (resizing shape size according amount of text http://msdn.microsoft.com/en-us/library/office/aa200988(v=office.10).aspx#376 )

There is option "Thetext" Is there something similar like "Shapename"  8)
This will make the function
=IF(Sheet.2!Prop.Row_1 = "shapename".Width*1,0)
universal :)

MacGyver

if you have thousands of images, there may be a better way to do it, having the images in a database or something and when the number is changed, a macro is executed to pull the correct image from the database and insert it into the shape. you could execute the macro by using the TheText event cell

other issue:
there is nothing like shapename but you can use the getref function which should make it universal, if i am understanding your request correctly.  Simply substitute Sheet.X for the shapename

=IF(Sheet.2!Prop.Row_1=width(GetRef(Sheet.X))

kiler40

Database solution is the best so far... but still have no idea of VBA, macros and so one... so this is a dream solution yet

MacGyver

give me a week or so and i will see if i can work this in my spare time  to give you a sample access database, Visio drawing, and Visio Stencil to something you should be able to modify to fit your needs

kiler40

This will be more that i can ever ask :) Thank you so much ! 8)