News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Setting a custom property by dragging a control point

Started by ChaoticMike, July 25, 2008, 03:50:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ChaoticMike

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

vojo

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.

wapperdude

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.
Visio 2019 Pro

ChaoticMike

Thanks Wapperdude, the next time I'm in the office (!) I'll give it a go!

Mike

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 196 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1060KB.
Tokens: post-login.
Cache hits: 13: 0.00187s for 26,721 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]