Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: dipster6 on February 05, 2009, 09:29:52 PM

Title: Calculate available watts remaining in rack based on shapes within the rack
Post by: dipster6 on February 05, 2009, 09:29:52 PM
Have a scenario where I need to calculate the remaining power within a rack by subtracting power each time a shape is inserted into the rack.

Have a custom stencil which contains three shapes.

1. Rack - One data field is "Watts Remaining"
2. Power Strip - Three data fields - "Amps", "Volts" and "Watts" (Watts already calculated based on entries in the amps and volts fields)
3. Server - Has a "Watts" field

What I need to do is associate a data graphic with the rack which lists the value in the "Watts Remaining" field.  The watts remaining needs to = the total watts available within the rack by adding all shape.powerstrip.x.prop.watts.value fields together and subtracting the sum of all shape.server.x.prop.watts.value fields.

Can this be done?

Title: Re: Calculate available watts remaining in rack based on shapes within the rack
Post by: scott on February 09, 2009, 09:59:53 PM
One relatively straightforward way is to monitor two events: shape dropped and shape deleted.

When you drop a new rack onto the page, set its Watts Remaining field to the appropriate value, then

The data graphic displaying the Watts Remaining field will be updated automatically as the value changes. Unless I'm missing something, this should do what you need.
Title: Re: Calculate available watts remaining in rack based on shapes within the rack
Post by: ben.oates on April 29, 2009, 04:56:34 PM
I am in a similar situation but I will need more information than the answer provided because I'm afraid I still don't understand.

I have a server shape and an instance shape. When I drop an instance shape onto a server shape it will be assigned a minimum/maximum heap size. I want to add all the minimum and maximum heap sizes together to show minimum/maximum memory in use on the server.

Almost identical problem, really.

However; as I imagine is the case with the original post. I might have more than one Server shape on a page. How do I reference the one I dropped a shape onto? Especially as there will be a number of other shapes inbetween.

Thanks,

Ben
Title: Re: Calculate available watts remaining in rack based on shapes within the rack
Post by: aledlund on April 29, 2009, 05:11:52 PM
I believe David Parker talks to this type of solution/requirement in his book (visualizing information.....)
al
Title: Re: Calculate available watts remaining in rack based on shapes within the rack
Post by: Visio Guy on May 01, 2009, 06:04:54 PM
I wonder if this add-in might help?

Rack Server Virtualization Add-in (http://www.visguy.com/2009/04/14/rack-server-virtualization-add-in/)

It might be overkill for what you need, or perhaps solving a different problem, but maybe worth a look!
Title: Re: Calculate available watts remaining in rack based on shapes within the rack
Post by: ben.oates on May 11, 2009, 10:58:06 AM
Thanks for that Visio Guy. Even if it doesn't help me, I know people this will come in very handy for. I'll try to dissect it for my needs.