News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

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/

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 252 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1110KB.
Tokens: post-login.
Cache hits: 13: 0.00225s for 26,723 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]