Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: ChaoticMike on July 25, 2008, 03:50:37 PM

Title: Setting a custom property by dragging a control point
Post by: ChaoticMike on July 25, 2008, 03:50:37 PM
How do I do it?

I have developed a chevron shape that always has the same angle at its point, regardless of whether or not you resize the shape by stretching it.  The angle is basically determined by specifying a value for a custom property that says how far from the right hand edge the point should be.  It's a fixed value, rather than being proportional.  Currently, I change the value of the custom property by typing a value in a box.  I want to be able to change this parameter dynamically, by moving one of those Funky Yellow Control Points around.  I've worked out how to put the FYCP onto my chevron, but that's where everything stops!  Unfortunately, I have no idea how to make the control set a value  >:( and I can't find any documentation anywhere to give me a clue.

So... all help gratefully received...

Mike
Title: Re: Setting a custom property by dragging a control point
Post by: vojo on July 25, 2008, 07:01:32 PM
why not just using pinx as the distance from the edge (assume 0,0 is on the edge...may need to do some math checks of 0,0 is in the center of the sheet).   Make decisions off that.
Title: Re: Setting a custom property by dragging a control point
Post by: wapperdude on July 25, 2008, 08:26:36 PM
For those into FYCPs, the process is simple, and probably half the effort completed.

Open the shapesheet for the chevron.  If not already present, right click in the shape sheet, and either select View Section or Insert Section, and choose Controls.  One row will be shown.  The row name maybe changed if desired, should be Controls.Row_1.  In the X cell, enter Width*0.5.  Actually, this isn't that important, just conveniently sets the x-location at middle width of the shape, and presumably at the tip of your chevron.  The Y cell value can be left as is, at 0.

In the Geometry section, one (or two) of the "line to" entries will correspond to your chevron tip (or tips if you have an upper and lower tip).  In the X Cell value, enter:  Controls.Row_1 for either or both tips.  A single FYCP can control one or both.  If you want to move the chevron tip(s) vertically, in the Y Cell value enter:  Controls.Row_1.Y.

That's it.

Happy morphing.
Title: Re: Setting a custom property by dragging a control point
Post by: ChaoticMike on July 29, 2008, 09:43:07 AM
Thanks Wapperdude, the next time I'm in the office (!) I'll give it a go!

Mike