Drawing a power tree

Started by soultrane, July 10, 2009, 10:50:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

soultrane

The fundamental question:

    Is there a way to "draw" a heiarchy so that the parent node can add values at the child nodes?

[Parent Node:  Property Sum = 15]------+-----[Child Node 1: Property Value_To_Sum = 10]
                                                       |
                                                       +-----[Child Node 2: Property Value_To_Sum = 3]
                                                       |
                                                       +-----[Child Node 2: Property Value_To_Sum = 2]

    The task is to automate this, so if I added a new child node with the "Value_To_Sum" property populated with some value (say 4), then the parent node would automatically add this to its sum when I drew a line from the parent to the child?

     I would prefer to automate this using built-in functions, smart shapes, etc. instead of visual basic or some coding method. 

     Previously, I had used a spreadsheet to do this task.  However, if visio can do this - I would like to use this more visual method.


wapperdude

#1
I don't think you can do this without code.  But, for starters, take a look at this post:  Calculate available watts remaining in rack based on shapes within the rack  (http://visguy.com/vgforum/index.php?topic=706.0)  The text that Al refers to is:  Visualizing Information with Microsoft Office Visio 2007.

You may also want to check out these topics on VisioGuy's blog site:
Path Analysis in Visio (http://www.visguy.com/2009/04/08/path-analysis-in-visio/)
Analyze Connectivity Between Process Flows (http://www.visguy.com/2009/04/22/analyze-connectivity-between-process-flows/)

HTH
Wapperdude
Visio 2019 Pro

aledlund

The problem I ran into is that of hierarchys of greater than two (i.e. calculate a racks power, when the subcomponents (blades in servers and network switches) are the real culprits. Chassis vendors (servers/networking) often have custom proprietary tools to help in this area. So you had to provide a mechanism that could drill down, in my case I use the hierarchyid structure in ss2008.

When recommending commerical grade solutions for rack power management I usually recommend stuff from the APC product sets.

The current version of Netzoom (http://www.netzoom.net/products/products_overview.php) has some enhanced reporting that does not require active probes, but once again this is a code based solution and not free.

al

vojo

This just another case for shape awareness in visio :D

If a shape had a unique handle that could be used as a look up from another shape and funneled into getref(), then
this problem would be trivial. 

Even if the handle was funneled thru a special connector so shape 1 could figure out and
use the handle on the other end of the connector (shape 2)....something like a general purpose begtrigger and endtrigger macro that was standard and useful other than routing ;D

If visio had this...there are lots lots lots of cool things that could be done

Visio Guy

Don't the Pivot Diagrams in Visio 2007 (Professional only??) do this sort of thing?

I haven't played with them for a while, so I don't clearly remember the details, but I'm pretty sure they are all about "rolling up" sub-totals and sub-items.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

aledlund

That's exactly what pivot tables are for, drill down and compute. The relatively simple challange is to understand the hierarchy chain (parent/child) and recurse through it. I do it external to the drawing because of the performance hit of going across the +com boundary. The other (primary) reason is that by putting the data external I can get out of the report writing business for users that want something 'a little different'.
al

wapperdude

Yes.  Pivot feature not included in V2007 Std.
Visio 2019 Pro

vojo

but getting into pivot diagrams to do this is like taking a sledge hammer to a peanut.
One ends up having to build a whole convoluted solution (several files, etc) do this simple task.
If one goes that far....mind as well think about writing code as well (at least for dispersing the solution out to users)

soultrane

#8
I am happy to see the discussion over this.  I had read a certain amount of information on the forum but had not been able to cover all discussions.  Although this clarification is not altogether useful, this is not intended as a rack calculator.  This is for power within a "complex" electronic device with several power rails and cascaded power rails (such as used in a desktop computer system).  Therefore, using different shapes is not as useful (i.e. different shapes representing different current values) as they are dynamic.  As I get a spec update, I want to update the child current requirement and have that propogate up the line (depending on efficiency of the regulator/etc and calculating required input regulator current).

This is simple to do with excel.

Is there a function that can limit a calculation based on "geography"?  I can make a rule that the child nodes are all located within an (X1,Y1)<-->(X2,Y2) boundary. 

So can I say SUM(ALL_WITHIN(x1,y1,x2,y2,CURRENT_VARIABLE))?

This is still not optimal since it is only "easy" to use this method with one node per level (the problem with using above of how to know that child nodes are connected to the given parent node, or some other parent node).  However, it may help solve the problem without using code if such a thing exists.

It sounds like the intuitive function that is required to make this sort of summing to work may not exist in Visio (Vojo's comment).  And, although there MAY be a way to do this without code - it's a bear.

For reference, I do not see any "professional" designation to my installation of Visio.  The "about" box says:

Visio 2007 (12.0.6336.5001) SP1 MSO (12.0.6320.5000)

Even so, I'll do some research on pivot tables and determine if it makes sense to use them/update Visio/etc.

Later comment: I used the method described here (http://visguy.com/vgforum/index.php?topic=945.0) to determine I do have the professional version (display data on shapes is available).


Thanks again.

soultrane

As a followup - if no solution can be found to setup an environment within Visio to enable automatic summing (and other calculations) of shapes connected in a tree layout, then I will consider the more restrictive use of importing data from excel:

http://office.microsoft.com/en-us/visio/HA100518191033.aspx

Then I can draw the tree and hope that connections will not drastically change.  Update the excel spreadsheet and use its formulas to keep track of the data.  Then link this spreadsheet to a graphical representation of the data in visio.  Seems a bit cumbersome to release two files (xls and vsd) in order to manipulate this visio drawing.  However, it may be the easiest way compromise and get almost what I'm after.

STHBRDG

I know that this is old, however...

I watched video from Microsoft wherein, a developer used Windows Forms and C# to embed a visio document control.  That approach would give you the full power of Visio in addition to the controls available in Windows Forms including what you are talking about.