Visio 2003: Showing position of a Shape relative to anReference-Shape

U

Udo

Hello all,

suppose the following situation. I want to place a Reference-Shape on
a page and want to show the position (via a custom field) of a Shape
relative to that Reference-Shape. My main question is whether that's
possible via the Shapesheet at all - the postition should be updated
when one of the two Shapes is moved. In more detail the two Shapes are
just circles with a cross, and the intersection of that cross is the
position. Further it should be possible that different Reference-
Shapes can be used - so there must be a possibility to define a name
in the Shape (which Reference-Shape should be used). And how can I
handle my Shapes via a Stencil?

Thanks for any hints and greetings
Udo
 
A

AlEdlund

Graham Wideman has an example in his book (the drawing is called associate)
where he uses vba code to tie to shapes together.
al
 
J

John... Visio MVP

Udo said:
Hello all,

suppose the following situation. I want to place a Reference-Shape on
a page and want to show the position (via a custom field) of a Shape
relative to that Reference-Shape. My main question is whether that's
possible via the Shapesheet at all - the postition should be updated
when one of the two Shapes is moved. In more detail the two Shapes are
just circles with a cross, and the intersection of that cross is the
position. Further it should be possible that different Reference-
Shapes can be used - so there must be a possibility to define a name
in the Shape (which Reference-Shape should be used). And how can I
handle my Shapes via a Stencil?

Thanks for any hints and greetings
Udo


Two possibilities
1) Use the shapesheet of the page to keep track of the reference point
2) make the reference point and it's associated shapes a group with members
first and members reposition rather than scale with the group.

John... Visio MVP
 
V

vojo

couple other ideas
1. If you know the reference shape is always the first shape on a
page...then can
othershapes event on drop cell to calculate off the ref shape
Setf(getref(user.localref_x_of_refshape), <ref shape>.pinx)
2. if you do a template where ref shape is always on the page by default,
then can
use ref shape or page cells more easily for this.

Now I will say I did come up with a kludgy way to for two non related shapes
to become aware of each other without VBA. Basically, have some cells on the
page and "broker" shape that stiches the connection together. The trick is
that it plays with strings extensively. its not for the faint of heart.
Anyway, its posted in visio.guy discussion site:

http://visguy.com/vgforum/index.php?topic=9.0
 

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