Dynamic Text in visio

Started by MasonNation, August 21, 2008, 05:46:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MasonNation


First Question

Is it possible for the custom property value of a shape to be automatically displayed in the shapes text box? For example one shape has a cost property value of 50. I want that "50" to be displayed as text in the shapes text box. So when I update the property value the text changes.

Second Question

Is it possible to multiply the property value of one shape by the property value of another shape and have that result be evaluated and stored in as the property value of a third shape?  What I am trying to do it create a material balance flow map.

Any help is greatly appreciated.

Thanks

Mason

vojo

1:   select box==>insert==>field==>custom property
2:   if all 3 shapes in a group, yes but you need to define the relationship at design time
      ie....1+2*3==>4 is the designed in algorithm....1*2+3==>4 is an entirely different shape
      (if you want to get real slick...you might try 2007 and do the user defined functions...aka some
      custom properties to define how all the shape values are brought together).

      if not in a group, this this gets a whole lot more complicated if not impossible.
      There is no real nice way for 2 unrelated shapes to become aware of each other without writing VBA or
      C code.   You could do some special stuff just for your solution...but would be tediuos and only
      for that solution.   for example, some template with a bunch of shapes and VBA just to make the
      unrelated shapes work together.

      Another way is tie drawing to excell and work thru excell against the unrelated shapes then pipe
      result back into drawing.

      good luck

Visio Guy

Hi Mason,

You can reference values in other shapes via the ShapeSheet. You have to do this by hand or using code, there's no easy user interface to set this up. In the ShapeSheet, the formula might look something like this:

Prop.InflowTotal = Sheet.1!Prop.Outflow + Sheet.15!Prop.Outflow

where Sheet.1 and Sheet.15 are the IDs of two other shapes that are supplying the target shape with material.

Junichi Youda has a free download that is similar to what you want to do. Take a look at his Shapes for Visual Calculation: http://www.geocities.com/visualcalculation/

Let us know how you get along. I think Visio could do a really nice job at solving these types of problems, it just needs a few utilities to help users get going.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

MasonNation

Thanks for the adivce, I feel like I am almost there. Where can I find the Shape IDs for the shapes I want to reference? I assume its displayed in the shape sheet window somewhere.

Thanks so much for the help

Mason


Visio Guy

Hi Mason,

You can find the Shape ID under the Format > Special dialog. If you're using Visio 2007, it gets slightly more tricky.

See the following article for details, and look for Reason #8:

Top 9 Reasons for Turning-on Developer Mode
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Paul Herber

All the IDs are also visible in the Drawing Explorer
menu View -> Drawing Explorer Window

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/