Arithmetic in Measurement Box

Go Metric :slight_smile:

I’m used to doing math in the input fields of PowerCADD. Funny thing is, the first thing that came to mind as an example of how I would use that happens to work in SketchUp anyway. Modular brick courses are 3 courses for every 8" course of concrete block, so one course is 8/3". I’ve done that tons of times in PC, and trying it in SU, that turns out to work.

On MacOS, you should expect to copy and paste text anywhere you can type. I do that all the time, though not so much in SU measurement box. Occasionally I’ve had trouble with some bug where I just get the letter v when I try pasting with Command-v.

The measurements box handles fractions, which can cause the impression that it does arithmetic but it really doesn’t.

Those interested in a calculator can try this. It is a Sketchup plugin for Windows only. Actually, the calc may work for mac but the “send to Measurements” part is Windows only as it uses win32ole to send keys to SketchUp.

To use, open the calc from the Extensions menu. Mouse-over the calc and enter your expression. Hints are given for invalid expressions. Press Enter to send the result to SketchUp. SketchUp must be waiting for an input - such as immediately after drawing a line or circle.

It uses a library called math.js for the expression evaluation which includes symbols for many units (Length, etc.) You can not use ' or " though, you must use ft or in instead.

Maybe useful to someone. Take the code and do what you like with it - I’m not planning on developing it further.

jf_calc.zip (268.2 KB)

1 Like

Thank you! I’ll try it.

It’s pretty broken now that I’ve tried it which is probably why it’s been sitting on my computer for 3 years. It probably works with the most common length units, but definitely needs some work.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.