Re: ParentShape! Help please. (Visio 2007)
- From: "John Goldsmith" <FirstName.LastName@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 13 Sep 2007 10:07:24 +0100
Hello Bob,
Yes, basically that's it although I'll modify my advice and suggest you
listen for a cell change event on say the BeginX cell and then check the
connections To*** to return its respective 'glued to' shape and as you
say, add this shape name to a User cell in the master that you could call
something like User.Rack.
You might find this link useful for the event listening part:
http://msdn2.microsoft.com/en-us/library/aa201790(office.10).aspx
There's also a good deal of stuff within the SDK although this is mostly
VB/C#.NET. VBA would be fine for this.
A couple of other points are the CALLTHIS Shape*** function that allows
you to call methods in your code and the SpatialNeighbors property of the
shape object (http://msdn2.microsoft.com/en-us/library/ms367943.aspx), which
you might find useful in order to get the rack to room relationship even if
its not glued.
Anyway, I hope that sets you on the right path. No doubt you'll have other
specific questions as you go so maybe post these as separate questions so
the rest of the group benefits.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
"Lucky Bob" <LuckyBob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C1AE3E60-1C57-48DB-A19D-28CAB8F524A4@xxxxxxxxxxxxxxxx
Thanks again John,
My VB is really rusty as my current job doesn't use it often (I haven't
done
any since VB6!) . Is this the basic process:
A drop event I will call a VBA Function
Using the dropped "object" as a start find the parent.
Get the value from the parent objects property.
Then set a property on the dropped on the dropped object.
Regards
Bob
"John Goldsmith" wrote:
Glad you're clear on that now!
Well, the standard method of associating a server with a rack would be to
use glue (I assume you're already using a Rack Diagram or equivilant) and
I
see that you've been discussing this with JuneTheSecond. You could
certainly read the diagram programatically and add a User cell containing
the shapes (server's) parent rack and this could be 'reported'. The glue
would ensure the servers moved with the rack and keep everything
together.
You could carry out a similar process with the rack to room relationship.
In terms of the double files problem, the link with Excel isn't a bad
one,
and certainly if you're using 2007 Pro this becomes a much more simple
task,
again in terms of associating a server record with a rack shape. Other
data
links such as the Database Wizard (also in 2003) would allow a two-way
link
(read/write) between data and shapes.
So in summary, my suggestion would be glue you server shapes and then
read/process them programatically and ideally have on drop events that
carry
out the server/rack association at that point.
The above feels a little generic so let me know if you'd like more
details
on specific areas.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
"Lucky Bob" <LuckyBob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9FD130C2-585C-4C05-9736-89756C62D8BB@xxxxxxxxxxxxxxxx
Thanks for trying to help John,
You quickly sumerised what it took a few hours for me to learn earlier
today. I'll try and summerise what I am trying to achieve in case
anyone
has
any sugestions.
We maintain diagrams of the racks in our server rooms, these diagrams
are
looked at and updated during projects to show physical layouts or
planned
physical layouts. Many of the shapes(Servers/routers etc) contain shape
data
for the heat and power consumption etc (and all can have it). We also
have
an
excel spread*** with the same equipment and the same data the only
thing
extra is the spread*** totals this data by rack and by data centre.
If we move a system or do what ifs we need to amend two documents. I
hoped
to remove/automate the spread *** based on the diagrams. I.E. put a
system
in a rack it could pick up the rack number from the parent. that way I
could
run a simple report getting all the data I need.
any ideas?
Thanks in advance
Bob
"John Goldsmith" wrote:
Hello Bob,
The example uses two shapes that it calls (for want of better terms)
Parent
and Child. You could actually name your shapes as such but more
likely
is
that they'll have real ID values
In this case you're entering a formula into the Child shape, whose
really
ID
might be something like ***.2, so that it tracks the position of the
Parent shape (possibly ***.1). Right click on your first shape that
you
want to track and select Format / Special... Make a note of its ID
property, which is at the top. The example calls this shape the
parent
shape, So if your ID is 1 say, then your shape reference that you
place
in
the child shape PinX cell should be "***.1!PinX".
A further point is that the example formula references a two User
cells.
These needs to be in place before you add the PinX/Y formulae
otherwise
you'll get an error as you're trying to reference a cell that isn't
there.
Best regards
John
John Goldsmith
www.visualSignals.co.uk
"Lucky Bob" <LuckyBob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3E48BF50-E9EB-4F68-B37A-BC8DC30DC4BE@xxxxxxxxxxxxxxxx
The SETATREF Function
(http://msdn2.microsoft.com/en-us/library/ms425563.aspx)
Uses ParentShape!PinX in it's second example. but I just get error
in
formula if I try and use it as in the example or on its own.
when I search for ParentShape! it seems like everyone wants this but
that
it
doesn't exist!
Does it? if so any idea why it won't work
.
- References:
- Re: ParentShape! Help please. (Visio 2007)
- From: John Goldsmith
- Re: ParentShape! Help please. (Visio 2007)
- From: Lucky Bob
- Re: ParentShape! Help please. (Visio 2007)
- From: John Goldsmith
- Re: ParentShape! Help please. (Visio 2007)
- From: Lucky Bob
- Re: ParentShape! Help please. (Visio 2007)
- Prev by Date: Re: ParentShape! Help please. (Visio 2007)
- Next by Date: Re: extract database diagram tables' information
- Previous by thread: Re: ParentShape! Help please. (Visio 2007)
- Next by thread: Re: extract database diagram tables' information
- Index(es):