Author Topic: Imperial to metric Calculator  (Read 12180 times)

0 Members and 1 Guest are viewing this topic.

theluck19

  • Newt
  • Posts: 93
  • ABC (ADDICTED to BOOZE & CAD.)
Imperial to metric Calculator
« on: May 24, 2010, 01: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..

Win 10 Pro 64+AutoCAD 2019

Daniel Eiszele

  • Newt
  • Posts: 85
Re: Imperial to metric Calculator
« Reply #1 on: May 24, 2010, 06: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: 93
  • ABC (ADDICTED to BOOZE & CAD.)
Re: Imperial to metric Calculator
« Reply #2 on: May 24, 2010, 08: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".
Win 10 Pro 64+AutoCAD 2019

Daniel Eiszele

  • Newt
  • Posts: 85
Re: Imperial to metric Calculator
« Reply #3 on: May 24, 2010, 06: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

  • Needs a day job
  • Posts: 7527
Re: Imperial to metric Calculator
« Reply #4 on: May 24, 2010, 06: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 11 x64 - AutoCAD /C3D 2023

Custom Build PC

theluck19

  • Newt
  • Posts: 93
  • ABC (ADDICTED to BOOZE & CAD.)
Re: Imperial to metric Calculator
« Reply #5 on: May 25, 2010, 12:59:47 AM »
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.. :-(
Win 10 Pro 64+AutoCAD 2019

Daniel Eiszele

  • Newt
  • Posts: 85
Re: Imperial to metric Calculator
« Reply #6 on: May 25, 2010, 05: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: 93
  • ABC (ADDICTED to BOOZE & CAD.)
Re: Imperial to metric Calculator
« Reply #7 on: May 25, 2010, 08: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..
Win 10 Pro 64+AutoCAD 2019

Atwist

  • Guest
Re: Imperial to metric Calculator
« Reply #8 on: May 25, 2010, 01:20:32 PM »
Hello theluck19,

IL think dis is watt your looking for. 8-)

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

My software/metric Converter V4.2

theluck19

  • Newt
  • Posts: 93
  • ABC (ADDICTED to BOOZE & CAD.)
Re: Imperial to metric Calculator
« Reply #9 on: May 26, 2010, 02:24:25 AM »
Not quite im afraid, :-( I need the output as 1'-1 3/4" not as 13.75)
Win 10 Pro 64+AutoCAD 2019

Atwist

  • Guest
Re: Imperial to metric Calculator
« Reply #10 on: May 26, 2010, 03:58:47 AM »
Oke

Try dis whan

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

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

theluck19

  • Newt
  • Posts: 93
  • ABC (ADDICTED to BOOZE & CAD.)
Re: Imperial to metric Calculator
« Reply #11 on: May 26, 2010, 04:07:10 AM »
Exactly what i needed.. Thanks.. :-)
Win 10 Pro 64+AutoCAD 2019

mdbdesign

  • Newt
  • Posts: 52
Re: Imperial to metric Calculator
« Reply #12 on: June 02, 2010, 10: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

  • Guest
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