Author Topic: [SOLVED] formula "=SQRT(Width)" returns error #DIM!  (Read 3342 times)

0 Members and 1 Guest are viewing this topic.

nashwaan

  • Full Member
  • ***
  • Posts: 85
[SOLVED] formula "=SQRT(Width)" returns error #DIM!
« on: October 01, 2011, 08:48:41 AM »
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.
« Last Edit: October 02, 2011, 11:01:52 AM by nashwaan »
Give me six hours to chop down a tree and I will spend the first four sharpening the axe — Abraham Lincoln

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: Help - formula "=SQRT(Width)" returns error #DIM!
« Reply #1 on: October 01, 2011, 06: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.
« Last Edit: October 01, 2011, 09:24:48 PM by JuneTheSecond »
Best Regards,

Junichi Yoda
http://june.minibird.jp/

nashwaan

  • Full Member
  • ***
  • Posts: 85
Re: [HELP] formula "=SQRT(Width)" returns error #DIM!
« Reply #2 on: October 01, 2011, 10:41:24 PM »
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.
Give me six hours to chop down a tree and I will spend the first four sharpening the axe — Abraham Lincoln

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: [PARTIALLY SOLVED] formula "=SQRT(Width)" returns error #DIM!
« Reply #3 on: October 02, 2011, 01:19:16 AM »
=SQRT(Width/ThePage!PageScale) ?
if your drawing is not scaled.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

nashwaan

  • Full Member
  • ***
  • Posts: 85
Re: [PARTIALLY SOLVED] formula "=SQRT(Width)" returns error #DIM!
« Reply #4 on: October 02, 2011, 11:00:20 AM »
Yes, this solves it.
Thanks JuneTheSecond. You are star!  8)

Yousuf.
Give me six hours to chop down a tree and I will spend the first four sharpening the axe — Abraham Lincoln

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: [SOLVED] formula "=SQRT(Width)" returns error #DIM!
« Reply #5 on: October 03, 2011, 08:39:27 AM »
Hi All,

This article relates to the problem in this thread:

Casting Units in Visio’s ShapeSheet
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010