How to set stencil master PinX relative to another shape?

Started by Bestekov, March 28, 2014, 03:43:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bestekov

Hello all, I just started using Visio this week and this board has been invaluable! I'm struggling with a stencil positioning issue that I'm hoping someone has an answer for.

Short Question
How can I make a stencil master with PinX, PinY relative to another shape in my document?

Details
I am trying to make a timeline with several rows of information (started from this tutorial) tied to a data source. I want to have a text box label on the left of every row. I can successfully link the PinX, PinY, LocPinX, LocPinY values relative to the timeline so that when I move the timeline, the boxes move. However, as soon as i turn the text box into a stencil master, it loses all connection to the timeline object.

When it is done, I want it to look like the "Desired Result.png"attachment. Unfortunately, when I drag my correctly configured shape into a stencil and then place it back in the drawing, I lose all connection to the timeline ("ShapeSheet Compare.png")

Am I doing something wrong or is this not possible outside of VBA?

Bestekov

Here are the sample files in case that is helpful.

Bestekov

EDIT: Updated the thread title to hopefully more accurately describe this issue.

In the meantime, I also tried setting the PinX to a fixed position and setting the PinY of my label shape and all my milestone shapes relative to Page!TopPageMargin, but the milestone shapes get overwritten with a reference to the timeline. I can't figure out what is overwriting the formulas in my milestone master.

vojo

the stencil shape is unaware (no visibility to the document shape)....so cant reference directly

Sort of goes to the limitation that shapes are unaware of each other and cant really discover each other.

You can reference to a page   (something like pinx = thepage!width *0 + 323mm)

Or you could put a "marker" in the stencil shape....then on drop, line the marker up with the document shape
(something like a "+" northeast of your shape and group them together and place in stencil...then on drop, line up the "+" where
you want it and sent the group to the back - assuming document shape already there)

If you want to get real slick, you can use action buttons to show/hide the "+")

Bestekov

Thank you for the reply vojo. I figured the issue was related to the stencil not being able to see any other shapes. However, the milestone stencils do somehow pick up a connection to the existing timeline shape. In the stencil master ShapeSheet there are a lot of places with Ref(), how do these shapes pick up the references to the timeline and is there any way to replicate that behavior in other shapes? Or is it some sort of behind the scenes voodoo for timeline-related shapes?

vojo

I believe milestones is a template....if so, then can have VBA and even stencils and manage the whole thing as a self contained environmnent

aledlund

'timeline' is an add-on with software associated to the shapes. The code that controls it is responsible for a lot of what you are seeing.
al

Bestekov

Ahh okay. Is there any way to dig into the MS Timeline code and extend it or hook custom shapes into it?

aledlund

M$ doesn't normally publish that type of insight. The closest thing is to examine the shapes to see how they call the add-in.
al