Author Topic: Set shape to behave differently depending which drawing page  (Read 2012 times)

0 Members and 1 Guest are viewing this topic.


  • Jr. Member
  • **
  • Posts: 42
Set shape to behave differently depending which drawing page
« on: October 19, 2011, 07:18:54 AM »
I have a shape which increments a number each time it is copied, based on the excellent template from visguy.

The template has two pages, with the same information to be shown slightly differently on each.  Let's say the user created 50 shapes on page 1, shown as a heirarchical breakdown. Each was numbered automatically from 1 to 50.

Now the user needs to show the same 50 on page 2, but this time with a flow instead of a heirarchy. So, they copy all 50 shapes and paste them on page 2.

Problem:  Everything increments by one. So shapes 1 to 50 become 2 to 51.

I'd like to include in the formula something along the lines of "Only increment on the page the shape was first dropped".  I've created a user defined cell in each sheet, identifying each as "breakdown" and "flow", and I'm trying to "grab" that information so that it doesn't change.

E.g. in the page, I have
User.diagram  = "breakdown"

In the shape I have
user.Firstpage = =ThePage!User.diagram

But, when I copy the shape from page 1 to page 2, it changes.  Any advice appreciated :)

(Visio 2003)


  • Hero Member
  • *****
  • Posts: 1515
Re: Set shape to behave differently depending which drawing page
« Reply #1 on: October 19, 2011, 08:01:17 AM »
You could manage this with a couple of shape user cells and some if statements   

Maybe something like
if((strsame(page!usercell, blah,"breakdown"), increment or whatever,   hold value constant) + dependson(eventdrop)    // certainly more logic needed...but I think you get the idea
eventdrop = setf(getref(user.localvalue), if(strsame(page!user.blah, "breakdown"), user.localvalue =user.localvalue+1, localvalue))       //logic here but may need some syntax work

but I think that only solves the immediate problem....the bigger problem is that as you update shapes or make a third page, you will have to mess all these shapes manually or vba

what you might want to think about is some sort of "master sheet or stencil"  or use the document stencil to update all shapes globally in the document to insert a shape at 31 or to
add behavior for 3rd page.