Author Topic: Constraints on Shape re-sizing  (Read 3401 times)

0 Members and 1 Guest are viewing this topic.

RudySchneider

  • Full Member
  • ***
  • Posts: 95
  • Old Dog Learns New Tricks
Constraints on Shape re-sizing
« on: February 19, 2015, 02:30:40 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4885
  • Ideas Visio-lized into solutions
Re: Constraints on Shape re-sizing
« Reply #1 on: February 19, 2015, 03:09:50 PM »
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

  • Full Member
  • ***
  • Posts: 95
  • Old Dog Learns New Tricks
Re: Constraints on Shape re-sizing
« Reply #2 on: February 19, 2015, 03:18:59 PM »
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

  • Full Member
  • ***
  • Posts: 95
  • Old Dog Learns New Tricks
Re: Constraints on Shape re-sizing
« Reply #3 on: February 19, 2015, 03:25:55 PM »
By the way, here's my shape, with automatically-generated connection points and sizing constraints.
There are no problems, only opportunities

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4885
  • Ideas Visio-lized into solutions
Re: Constraints on Shape re-sizing
« Reply #4 on: February 19, 2015, 03:38:24 PM »
 ;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
« Last Edit: February 19, 2015, 03:49:04 PM by wapperdude »
Visio 2019 Pro