How to detect a shape glued on top another shape.

G

Guy

Hello,


I'm trying to make a Visio solution with the aid of VBA to calculate
heat loss of a building. I've made a ground plan with wall shapes of
every floor separated on different pages. Afterwards window shapes
and door shapes where glued on top of the walls.
Now I want to find a way to know which windows are glued on top of
which walls so I can substract the surface of the windows and doors
with the surface of the wall.
Is it possible for the window shape to inherit a custom property of
the wall shape once glued on top of it ?
But I can't come up with a decent solution.
What would be the best way to do this ?

I'm pretty new to VBA in Visio 2002, if you have some example code ...
it would help me get started.

Help much appreciated. Thanks in advance !!

I'm using Visio 2002 Pro.

Cheers,

Guy
 
G

Guy

Yes, I'm using a copy of the wall shape of the standard template
"Wall, Shell and Structure" in an own made stencil (collection of
standard Visio shapes).
I only added 2 custom properties to the wall shape in "my" stencil.
 
R

Russ McKenna

Here is how I see it.
The window is glued to the wall, the wall is not glued to the window.
This means, with knowing the window shape you can find the wall that it is
glued to, you can not find out how many windows are glued to the wall with
out checking all the windows.

2 ways to approach solution:
1) You can go through every window and see if it is connected to Wall A,
if so then calculate heat loss, then move on to the next window. After all
windows, then check another wall.
2) Another way is to create a routine that will add the heat loss
properties to the wall when the window is glued to it. This approach would
be extremely challenging to someone new to VBA.
 
G

Guy

Russ,

When I draw my building plan I'm giving each wall a unique ID in a
custom property field I created in the wall shape.
When a window shape is glued on a wall it would be time saving when
the window inherits the custom property ID of the wall. Therefore I
wanted to know which formula is responsible in the window shape which
puts in the height field the appropriate wall reference as mentioned
before.
If I could also do that for the door shape then I can identify all
glued shapes of 1 wall because they all have the same ID.
 
R

Russ McKenna

Since over the years I have gleened much knowledge from the user groups, I
can guide you the best I can. Drop me a line at my e-mail since this may
take some time and this thread would be come unmanagable. Anyone else who is
interested in this application can contact me also. I will post the results
after Guy and I work it out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top