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

Constraints on Shape re-sizing

Started by RudySchneider, February 19, 2015, 07:30:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RudySchneider

Now that I've solved the problem of automatically placing and spacing connection points on a shape, I'm looking to constrain re-sizing the shape.

I can set up constraints using a BOUND function, like this:
BOUND(,0,FALSE,2*User.CnxnXOffset,2*User.CnxnXOffset,FALSE,2*User.CnxnXOffset+User.CnxnSpacing,2*User.CnxnXOffset+User.CnxnSpacing,FALSE,2*User.CnxnXOffset+2*User.CnxnSpacing,2*User.CnxnXOffset+2*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+3*User.CnxnSpacing,2*User.CnxnXOffset+3*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+4*User.CnxnSpacing,2*User.CnxnXOffset+4*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+5*User.CnxnSpacing,2*User.CnxnXOffset+5*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+6*User.CnxnSpacing,2*User.CnxnXOffset+6*User.CnxnSpacing)

My question is this:  Is there a shorter or better way to do this?  And my reason for asking is that I need to extend this capability out to the equivalent of 30 "segments:
That is, up to "...FALSE,2*User.CnxnXOffset+30*User.CnxnSpacing,2*User.CnxnXOffset+30*User.CnxnSpacing," and that just seems to be an overly unwieldy function.
There are no problems, only opportunities

wapperdude

I think the bound function requires this approach.  It might be possible to do something with mod function to mathematically generate points without having to hard code each one.

Never tried.

Wapperdude
Visio 2019 Pro

RudySchneider

Generate points?  The points are already taken care of.  As the subject indicates, I'm trying to constrain how the shape re-sizes, based on the User-defined CnxnOffset and CnxnSpacing.  Right now, the shape Width is governed by

=BOUND(,0,FALSE,2*User.CnxnXOffset,2*User.CnxnXOffset,FALSE,2*User.CnxnXOffset+User.CnxnSpacing,2*User.CnxnXOffset+User.CnxnSpacing,FALSE,2*User.CnxnXOffset+2*User.CnxnSpacing,2*User.CnxnXOffset+2*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+3*User.CnxnSpacing,2*User.CnxnXOffset+3*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+4*User.CnxnSpacing,2*User.CnxnXOffset+4*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+5*User.CnxnSpacing,2*User.CnxnXOffset+5*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+6*User.CnxnSpacing,2*User.CnxnXOffset+6*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+7*User.CnxnSpacing,2*User.CnxnXOffset+7*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+8*User.CnxnSpacing,2*User.CnxnXOffset+8*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+9*User.CnxnSpacing,2*User.CnxnXOffset+9*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+10*User.CnxnSpacing,2*User.CnxnXOffset+10*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+11*User.CnxnSpacing,2*User.CnxnXOffset+11*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+12*User.CnxnSpacing,2*User.CnxnXOffset+12*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+13*User.CnxnSpacing,2*User.CnxnXOffset+13*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+14*User.CnxnSpacing,2*User.CnxnXOffset+14*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+15*User.CnxnSpacing,2*User.CnxnXOffset+15*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+16*User.CnxnSpacing,2*User.CnxnXOffset+16*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+17*User.CnxnSpacing,2*User.CnxnXOffset+17*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+18*User.CnxnSpacing,2*User.CnxnXOffset+18*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+19*User.CnxnSpacing,2*User.CnxnXOffset+19*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+20*User.CnxnSpacing,2*User.CnxnXOffset+20*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+21*User.CnxnSpacing,2*User.CnxnXOffset+21*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+22*User.CnxnSpacing,2*User.CnxnXOffset+22*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+23*User.CnxnSpacing,2*User.CnxnXOffset+23*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+24*User.CnxnSpacing,2*User.CnxnXOffset+24*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+25*User.CnxnSpacing,2*User.CnxnXOffset+25*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+26*User.CnxnSpacing,2*User.CnxnXOffset+26*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+27*User.CnxnSpacing,2*User.CnxnXOffset+27*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+28*User.CnxnSpacing,2*User.CnxnXOffset+28*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+29*User.CnxnSpacing,2*User.CnxnXOffset+29*User.CnxnSpacing,FALSE,2*User.CnxnXOffset+30*User.CnxnSpacing,2*User.CnxnXOffset+30*User.CnxnSpacing)

Which works perfectly fine.  It's just a very long function!
There are no problems, only opportunities

RudySchneider

By the way, here's my shape, with automatically-generated connection points and sizing constraints.
There are no problems, only opportunities

wapperdude

#4
 ;D. Poor phrasing...by points, I meant step increments for sizing...that was the context of the topic.

By using modulus fcn, might be able to get shape steps mathematically without having to hard code each step.

Wapperdude
Visio 2019 Pro

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: 207 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1078KB.
Tokens: post-login.
Cache hits: 15: 0.00248s for 26,740 bytes (show)
Cache misses: 5: (show)
Queries used: 17.

[Show Queries]