Visio Guy

Visio Discussions => Programming & Code => Topic started by: orange12 on September 22, 2017, 06:27:31 PM

Title: How do I create a shape data that sums the values of connected shapes' data?
Post by: orange12 on September 22, 2017, 06:27:31 PM
Hello, I'm running Visio 2013 and trying to create a power distribution diagram that shows a power supply unit (PSU) connected to multiple loads. The trick is, I want the PSU to have a 'Watts' shape data with a value field that automatically sums the 'Watts' shape data from all connected loads. Furthermore, if a connection between a load and the PSU is removed, I want the PSU's shape data to update accordingly.

I imagine this would be a macro but what would be the trigger event and where would I put the macro call within the PSU's Shapesheet?

Thanks for the help.
Title: Re: How do I create a shape data that sums the values of connected shapes' data?
Post by: JuneTheSecond on September 23, 2017, 06:44:41 AM
I think it possible, but I don't remember the details.
My stencils in my home page are too complicated for your purpose.
Unfortunately, I forgot how the first stage that might be proper for your requirement.
Title: Re: How do I create a shape data that sums the values of connected shapes' data?
Post by: Yacine on September 23, 2017, 03:46:22 PM
@Junichi,
no your stencils are not too complicated. I demonstrated that in this post: http://visguy.com/vgforum/index.php?topic=7994.0

@Orange12, have a look at the a.m. topic, in the macros you'll see how to sum the values.

Regards,
Y.