Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: nashwaan on October 01, 2011, 01:48:41 PM

Title: [SOLVED] formula "=SQRT(Width)" returns error #DIM!
Post by: nashwaan on October 01, 2011, 01:48:41 PM
Hello,

Why SQRT() ShapeSheet function with dimensioned value causes error?
For example, this formula "=SQRT(9)" is valid and returns 3
but this formula "=SQRT(9 in)" is not valid and returns error #DIM!   Why is this?

I need this in order to get square root of shape's width, i.e
User.Temp = "=SQRT(Width)"    << but it is not working

any idea how to solve this?
and one more thing, what does #DIM! mean?

Thanks,
Yousuf.
Title: Re: Help - formula "=SQRT(Width)" returns error #DIM!
Post by: JuneTheSecond on October 01, 2011, 11:18:25 PM
"=SQRT(9 in/1 in)" or "=SQRT(9 in*1 in)"
I've also been wasting much time how to treat units in Visio.
Title: Re: [HELP] formula "=SQRT(Width)" returns error #DIM!
Post by: nashwaan on October 02, 2011, 03:41:24 AM
Thanks JuneTheSecond,

This solved my issue and this is not easy to figure out. I thought that i would need to use ShapeSheet function like VALUE() or QUNATITY() but no such function exists.

Although dividing by 1 in resolves this issue, it does not look to me a generic method. For example what if the Width is expressed in cm or ft? What should be written in order to get just the value of width without its unit, so it can be used in functions like SQRT()?

Thanks,
Yousuf.
Title: Re: [PARTIALLY SOLVED] formula "=SQRT(Width)" returns error #DIM!
Post by: JuneTheSecond on October 02, 2011, 06:19:16 AM
=SQRT(Width/ThePage!PageScale) ?
if your drawing is not scaled.
Title: Re: [PARTIALLY SOLVED] formula "=SQRT(Width)" returns error #DIM!
Post by: nashwaan on October 02, 2011, 04:00:20 PM
Yes, this solves it.
Thanks JuneTheSecond. You are star!  8)

Yousuf.
Title: Re: [SOLVED] formula "=SQRT(Width)" returns error #DIM!
Post by: Visio Guy on October 03, 2011, 01:39:27 PM
Hi All,

This article relates to the problem in this thread:

Casting Units in Visio's ShapeSheet (http://www.visguy.com/2006/10/03/casting-units-in-visios-shapesheet/)