Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: AntmanLFE on May 07, 2014, 03:31:19 AM

Title: Best way of controlling shape visibility?
Post by: AntmanLFE on May 07, 2014, 03:31:19 AM
I have made a multi label shape and would to only show a user defined amount of points.

What would be the best way to go about this. I have attached the shape in question for reference.

I have added shape data for the point count to be prompted on drop although i am at an end of how i should go about turning off the excess points. I have tried layers but that did produce expected results due to the grouping i presume.

Any ideas?
Title: Re: Best way of controlling shape visibility?
Post by: vojo on May 07, 2014, 05:13:02 AM
Either use VBA or use very tedious shapesheet approach

VBA speaks for itself

Shapesheet would be something like this

props.numpnts = <user input>
eventdbleclick = docmd(1312)
for each geometry in the shape, do this
   geometrynoshow = guard(if (props.numpnts > <some n for each geometry>, false, true)
for each text in shape  ( you may want to do the shape as a group and have individual text blocks)
   texttransparency = guard (if props.numpnts > <same n>, 0%, 100%)

For as many lines as you show...the shape sheet can get tedious to code....since you are likely to group, you may want to do this
in groups of 4, do some math at group level and pass down to child shapes

Below does sort of the same thing with a isometric connector group
right click an double click to see what it does.....
the geometry calculations are real complex, but you can get the idea with the right click offsets

Title: Re: Best way of controlling shape visibility?
Post by: wapperdude on May 07, 2014, 06:19:17 AM
Who's deciding how many points (and labels) to show, you or the user?  If the user isn't allowed, then, is the goal to prevent him (her) from making changes.  Protecting the shape is very difficult in Visio.


Wapperdude