Search code examples
linescaleshapesvisio

How properly set line scaling in ms visio


I trying to create scallable shapes in Visio I manage to set scaling for text, but when it comes to lines i cant make it work:

Here i have shape

enter image description here

I setup linewidth as described here http://visguy.com/vgforum/index.php?topic=5261.0

Now i set scale for a page to metric 1:5

enter image description here

I have a ethernet switch shape and need that scale so it fit on page.

So, when i did it, i get this:

enter image description here

So it did not scale lines at all.

How to fix it?


Solution

  • It's pretty simple actually, you need use advanced formula from - http://visguy.com/vgforum/index.php?topic=5261.0

    You need add User Cells:

    User.Width_LineWeight = 2 in
    User.Height_LineWeight = 1 in
    User.AntiScale = ThePage!PageScale/ThePage!DrawingScale
    

    now just set formula

    LineWeight  = SETATREFEXPR(1 pt) * (Width / SETATREF(User.Width_LineWeight, SETATREFEVAL(Width)) + Height / SETATREF(User.Height_LineWeight, SETATREFEVAL(Height))) / 2  *  User.AntiScale
    

    For my example i have 1 rectangle shape and line shape

    For rectangle you need this settings

    User.Width_LineWeight = set rect real width
    User.Height_LineWeight = set rect real height
    

    In formula set first number as line width

    LineWeight  = SETATREFEXPR(2.5 pt)...
    

    enter image description here

    For line

    User.Width_LineWeight = set line width in pt
    User.Height_LineWeight = set to 1
    

    enter image description here

    That all. Well it seems not 100% accurate, but on scaling to smaller sizes it so far looks just fine.