Bound variables for height/width

Started by AnotherNoOne, July 24, 2017, 07:46:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AnotherNoOne

Hi,
i want to make a square, wich can be resized via pushing/pulling like usually.
The problem: the height and width only should be a multiple of 5mm (5,10,15,.....)
Is there a Operator/Formula to only allow for certain values to be the height/width?

Thx for the help in advance!
Another_Noone

Just some weirdo on the Interwebs.

AnotherNoOne

Idiot gonna be an idiot, its the BOUND function -.-

But is there any way to not set each single value ( 5,10,15,20,25,30,....) but more like "y=x*5"?
Another_Noone

Just some weirdo on the Interwebs.

Yacine

Bound is a solution, but you need to put all the values inside.

Try this post: http://visguy.com/vgforum/index.php?topic=1463.0
Yacine

AnotherNoOne

Another_Noone

Just some weirdo on the Interwebs.

AnotherNoOne

So, is there a way for Visio to accept something like Height=5*Height...
So i dont have to put in every possible number, but it works for every multiple of 5?

Another_Noone

Just some weirdo on the Interwebs.

Yacine

I don't understand your question. I thought you found the solution in the post I recommended?
Yacine

Yacine

Another solution can be to use the setatref functions ( https://msdn.microsoft.com/de-de/library/office/ff765523.aspx )

Wapperdude taught me to use a dummy cell to get it working.
eg user.height
the height cell itself would get the formula: SETATREF(user.height,SETATREFEVAL(INT(SETATREFEXPR()/5)*5))
Yacine

AnotherNoOne

Thanks, thats exactly what i was looking for
Another_Noone

Just some weirdo on the Interwebs.

wapperdude

The provided formula does do what is needed, but, it does not place a limit on the minimum height.  So, the height could be set to zero, which then becomes somewhat problematical.

The attached file, looks at the width, but could be easily modified for height.  There are two shapes.  The first places a simple 1" minimum width.  The second allows for text entry, and places a minimum width based upon the text entered or the 1" minimum.  These are "hard coded" in the shapesheet formulas.

Wapperdude
Visio 2019 Pro

AnotherNoOne

Thanks, thats even better. My colleagues kept complaining about the rectangle to be able to shrink to 0x0, and then no be able to click on it, now thats fixed!
Another_Noone

Just some weirdo on the Interwebs.