### Author Topic: Imperial to metric Calculator  (Read 2831 times)

0 Members and 1 Guest are viewing this topic.

#### theluck19

• Newt
• Posts: 78
##### Imperial to metric Calculator
« on: May 24, 2010, 12:07:10 am »
Does anyone have a program that calculates MM to Inches & Vice Versa.

I am working on some drawings where the architect has used both dimensions in the drawings. I tried using the Quickcalc command but it is not very effective as it is time consuming. Is a there an easier way of doing this? Thanks..

#### Daniel Eiszele

• Newt
• Posts: 79
##### Re: Imperial to metric Calculator
« Reply #1 on: May 24, 2010, 05:30:44 am »
Are you after a routine that works from the command line or are you just after a stand alone calculator that operates more efficiently than quickcalc?  I can think of a few different implementations but it just depends on your usage.

#### theluck19

• Newt
• Posts: 78
##### Re: Imperial to metric Calculator
« Reply #2 on: May 24, 2010, 07:25:30 am »
Standalone will be more effecient as you say.. do you know where i can get one .
Another problem with the commandline is thet it displays the output as 12.25 rather than 12'-3".

#### Daniel Eiszele

• Newt
• Posts: 79
##### Re: Imperial to metric Calculator
« Reply #3 on: May 24, 2010, 05:45:39 pm »
I don't know of anything off hand but I could knock something together pretty quickly.  I will look at it after I get home from work tonight.

#### ronjonp

• King Gator
• Posts: 4249
##### Re: Imperial to metric Calculator
« Reply #4 on: May 24, 2010, 05:59:30 pm »
You want something like this?

Code: [Select]
`(defun c:xx (/ n)  (and (setq n (getdist "\Enter distance: "))       (princ (strcat "\nMM " (rtos (* n 25.4) 2 1) " Inches " (rtos (/ n 25.4) 3 1)))  )  (princ))`

Windows 8 x64 - AutoCAD 2014

Dell Optiplex 9010 / Intel I7-3770 / 8GB RAM / NVidia 550ti

#### theluck19

• Newt
• Posts: 78
##### Re: Imperial to metric Calculator
« Reply #5 on: May 24, 2010, 11:59:47 pm »
Thanks Dan & Ron.. I was thinking more like..
c:ddd

Please enter the distance (mm) you need to convert to feet & inches:

Command line Input : 300 (mm)

Output : 1'-0" Alert as dialog box or command line, (Precision 1/4")-Rounded positively.

I wrote something similar to Ron, using initget instead of getdist but i am having trouble controlling the precision & positive rounding.

What do you think is the next step as you can clearly see that i am a toddler when it comes to lisp..

#### Daniel Eiszele

• Newt
• Posts: 79
##### Re: Imperial to metric Calculator
« Reply #6 on: May 25, 2010, 04:54:22 am »
You're right, the Precision and Rounding is a bit more of an issue then I originally thought.  Especially since we don't generally have to deal with imperial measurements.  Having said that, when I said standalone, I was thinking of a windows program rather than an Acad commandline one.  Will that still work for you.  And if so how would you enter feet and inches for the conversion to millimeters?

#### theluck19

• Newt
• Posts: 78
##### Re: Imperial to metric Calculator
« Reply #7 on: May 25, 2010, 07:25:28 am »
Are you aware of any freeware windows application which can do the conversion the way we require? I did download a few but, the output format is not what i want. I recall using a built in calculator with Rebarcad which was a good tool for this problem. I'll keep looking, please keep me posted if you do find a solution. Thanks..

#### Atwist

• Newt
• Posts: 99
##### Re: Imperial to metric Calculator
« Reply #8 on: May 25, 2010, 12:20:32 pm »
Hello theluck19,

IL think dis is watt your looking for.

http://www.sjweeks.co.uk/

My software/metric Converter V4.2
Andreas

#### theluck19

• Newt
• Posts: 78
##### Re: Imperial to metric Calculator
« Reply #9 on: May 26, 2010, 01:24:25 am »
Not quite im afraid, I need the output as 1'-1 3/4" not as 13.75)

#### Atwist

• Newt
• Posts: 99
##### Re: Imperial to metric Calculator
« Reply #10 on: May 26, 2010, 02:58:47 am »
Oke

Try dis whan

http://www.pwr-tools.com/

Math/Fractions.........../converter
Andreas

#### theluck19

• Newt
• Posts: 78
##### Re: Imperial to metric Calculator
« Reply #11 on: May 26, 2010, 03:07:10 am »
Exactly what i needed.. Thanks..

#### mdbdesign

• Newt
• Posts: 48
##### Re: Imperial to metric Calculator
« Reply #12 on: June 02, 2010, 09:24:01 am »
Marek

#### jaberwok

• Guest
##### Re: Imperial to metric Calculator
« Reply #13 on: December 06, 2010, 05:34:56 pm »
Inches to mm is easy.
Two macros -

* 12.7

* 25.4

Put them on buttons and use them within your drawing command.

Circle
pick centre
6 (* 12.7) [when given a 6" diameter]

Result is a 152.4 diameter circle.

#### SDETERS

• Swamp Rat
• Posts: 715
##### Re: Imperial to metric Calculator
« Reply #14 on: December 07, 2010, 08:04:35 am »
Here is a program that converts all kinds of stuff
Good Day

Shane