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?
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
- each time a shape is dropped, subtract its watts value from the rack's
- each time a shape is deleted, add its watts value back to the rack
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.
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
I believe David Parker talks to this type of solution/requirement in his book (visualizing information.....)
al
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!
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.